LED definition is now board dependant
This commit is contained in:
parent
94e27a295b
commit
32c8f5ae00
16
global.h
16
global.h
|
@ -20,11 +20,25 @@
|
|||
/* system clock frequency in Hz */
|
||||
#define SYSTEM_CLOCK_FREQ 72000000
|
||||
|
||||
/* LED is on pin 11/PA1 */
|
||||
/* LED pin */
|
||||
#ifdef SYSTEM_BOARD
|
||||
/* for system board LED is on pin 11/PA1 */
|
||||
#define LED_RCC RCC_GPIOA
|
||||
#define LED_PORT GPIOA
|
||||
#define LED_PIN GPIO1
|
||||
#elif MAPLE_MINI
|
||||
/* for maple mini LED is on pin 19/PB1 */
|
||||
#define LED_RCC RCC_GPIOB
|
||||
#define LED_PORT GPIOB
|
||||
#define LED_PIN GPIO1
|
||||
#endif
|
||||
|
||||
/* switch on LED */
|
||||
void led_on(void);
|
||||
/* switch off LED */
|
||||
void led_off(void);
|
||||
/* toggle LED */
|
||||
void led_toggle(void);
|
||||
/* default output (i.e. for printf) */
|
||||
int _write(int file, char *ptr, int len);
|
||||
|
||||
|
|
Loading…
Reference in New Issue