| | |
| | | #define __LED_H__ |
| | | |
| | | #include "stm32f10x.h" |
| | | #include "dw_app.h" |
| | | |
| | | #define LED0_PIN GPIO_Pin_8 |
| | | |
| | | #if defined(NEWBOARD) && defined(WORK_MODE_TAG) |
| | | #define LED0_PIN GPIO_Pin_12 |
| | | #define LED0_GPIO GPIOB |
| | | #else |
| | | #define LED0_PIN GPIO_Pin_2 |
| | | #define LED0_GPIO GPIOA |
| | | #define LED_BLINK(...) GPIO_Toggle(...) |
| | | #endif |
| | | #define LED_BLINK(...) GPIO_Toggle(__VA_ARGS__) |
| | | #define LED0_BLINK LED_BLINK(LED0_GPIO, LED0_PIN) |
| | | #define LED0_OFF GPIO_WriteBit(LED0_GPIO, LED0_PIN, Bit_RESET) |
| | | #define LED0_ON GPIO_WriteBit(LED0_GPIO, LED0_PIN, Bit_SET) |
| | | |
| | | |
| | | void Led_Init(void); |
| | | void GPIO_Toggle(GPIO_TypeDef *GPIOx, uint16_t GPIO_Pin); |
| | | |
| | | #endif |