RISC-V/V003/midi/pwmconfig.h

21 lines
405 B
C
Raw Normal View History

2024-03-09 11:10:52 +01:00
#ifndef CONFIG_H
#define CONFIG_H
static constexpr unsigned HALF_LEN = 0x80u;
static constexpr unsigned MAXPWM = 2000u;
2024-03-12 13:24:01 +01:00
#if __riscv
2024-03-10 17:40:00 +01:00
#define LED_CFG GPIOD,4
2024-03-12 13:24:01 +01:00
#define BUT_CFG GPIOD,3,(GPIO_Speed_In | GPIO_UPDI_MPPO)
2024-03-10 17:40:00 +01:00
#elif __arm__
#define LED_CFG GpioPortA,0
2024-03-12 13:24:01 +01:00
#define BUT_CFG GpioPortA,3,GPIO_Mode_IN
2024-04-08 20:55:20 +02:00
#elif __linux__
#define LED_CFG 0
#define BUT_CFG 3
2024-03-10 17:40:00 +01:00
#else
#error "bad target"
#endif
2024-03-09 11:10:52 +01:00
#endif // CONFIG_H