20 lines
405 B
C
20 lines
405 B
C
#ifndef CONFIG_H
|
|
#define CONFIG_H
|
|
|
|
static constexpr unsigned HALF_LEN = 0x80u;
|
|
static constexpr unsigned MAXPWM = 2000u;
|
|
|
|
#if __riscv
|
|
#define LED_CFG GPIOD,4
|
|
#define BUT_CFG GPIOD,3,(GPIO_Speed_In | GPIO_UPDI_MPPO)
|
|
#elif __arm__
|
|
#define LED_CFG GpioPortA,0
|
|
#define BUT_CFG GpioPortA,3,GPIO_Mode_IN
|
|
#elif __linux__
|
|
#define LED_CFG 0
|
|
#define BUT_CFG 3
|
|
#else
|
|
#error "bad target"
|
|
#endif
|
|
|
|
#endif // CONFIG_H
|