mirror of
https://github.com/jhbruhn/eurorack.git
synced 2025-03-15 02:55:49 +00:00
parent
8955ae5e9a
commit
deeb59c51c
3 changed files with 36 additions and 6 deletions
|
@ -1,11 +1,10 @@
|
||||||
#include "gpio.h"
|
#include "gpio.h"
|
||||||
|
|
||||||
#include <gpio.h>
|
#include <stm32f37x_conf.h>
|
||||||
|
|
||||||
|
|
||||||
void GPIO::Init() {
|
void GPIO::Init() {
|
||||||
gpio_mode_setup(0, 0, 0, 0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void GPIO::Write(GPIO_TypeDef* port, uint16_t pin, bool state) {
|
||||||
void GPIO::Write() {
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,6 +3,37 @@
|
||||||
|
|
||||||
|
|
||||||
#include "stmlib/stmlib.h"
|
#include "stmlib/stmlib.h"
|
||||||
|
#include <stm32f37x_conf.h>
|
||||||
|
|
||||||
|
#define PORT_RST_OLED GPIOB
|
||||||
|
#define PIN_RST_OLED GPIO_Pin_0
|
||||||
|
#define PORT_SS_DAC0 GPIOB
|
||||||
|
#define PIN_SS_DAC0 GPIO_Pin_6
|
||||||
|
#define PORT_SS_DAC1 GPIOB
|
||||||
|
#define PIN_SS_DAC1 GPIO_Pin_7
|
||||||
|
#define PORT_RST_USB GPIOB
|
||||||
|
#define PIN_RST_USB GPIO_Pin_8
|
||||||
|
#define PORT_SS_USB GPIOB
|
||||||
|
#define PIN_SS_USB GPIO_Pin_9
|
||||||
|
#define PORT_SS_OLED GPIOB
|
||||||
|
#define PIN_SS_OLED GPIO_Pin_11
|
||||||
|
#define PORT_SDC_OLED GPIOB
|
||||||
|
#define PIN_SDC_OLED GPIO_Pin_12
|
||||||
|
|
||||||
|
#define PORT_GATE_OUT_1 GPIOA
|
||||||
|
#define PIN_GATE_OUT_1 GPIO_Pin_0
|
||||||
|
#define PORT_GATE_OUT_2 GPIOA
|
||||||
|
#define PIN_GATE_OUT_2 GPIO_Pin_1
|
||||||
|
#define PORT_GATE_OUT_3 GPIOA
|
||||||
|
#define PIN_GATE_OUT_3 GPIO_Pin_2
|
||||||
|
#define PORT_GATE_OUT_4 GPIOA
|
||||||
|
#define PIN_GATE_OUT_4 GPIO_Pin_3
|
||||||
|
#define PORT_GATE_OUT_5 GPIOA
|
||||||
|
#define PIN_GATE_OUT_5 GPIO_Pin_4
|
||||||
|
#define PORT_GATE_OUT_6 GPIOA
|
||||||
|
#define PIN_GATE_OUT_6 GPIO_Pin_5
|
||||||
|
|
||||||
|
#define GPIO_PIN(x) PORT_##x, PIN_##x
|
||||||
|
|
||||||
class GPIO {
|
class GPIO {
|
||||||
public:
|
public:
|
||||||
|
@ -10,7 +41,7 @@ class GPIO {
|
||||||
~GPIO() {}
|
~GPIO() {}
|
||||||
|
|
||||||
void Init();
|
void Init();
|
||||||
void Write();
|
void Write(GPIO_TypeDef* port, uint16_t pin, bool state);
|
||||||
private:
|
private:
|
||||||
DISALLOW_COPY_AND_ASSIGN(GPIO);
|
DISALLOW_COPY_AND_ASSIGN(GPIO);
|
||||||
};
|
};
|
||||||
|
|
2
stmlib
2
stmlib
|
@ -1 +1 @@
|
||||||
Subproject commit 035540af5f0877c3246d28bd952bf2316e65788b
|
Subproject commit 3394699e1046c5eef6269db87e965c788a9ebe25
|
Loading…
Reference in a new issue