mirror of
https://github.com/eddyem/tsys01.git
synced 2026-03-22 09:41:04 +03:00
Change USART1 to LEDs for T0/T1 presence indication (@ Tcalc_screen_ver2)
This commit is contained in:
@@ -36,6 +36,12 @@
|
||||
#define LED1_port GPIOA
|
||||
#define LED1_pin (1<<15)
|
||||
|
||||
// LEDs for T0/T1 (PA9/PA10)
|
||||
#define LEDT0_port GPIOA
|
||||
#define LEDT0_pin (1<<9)
|
||||
#define LEDT1_port GPIOA
|
||||
#define LEDT1_pin (1<<10)
|
||||
|
||||
#define CONCAT(a,b) a ## b
|
||||
#define STR_HELPER(s) #s
|
||||
#define STR(s) STR_HELPER(s)
|
||||
@@ -46,6 +52,9 @@
|
||||
#define LED_blink(x) pin_toggle(x ## _port, x ## _pin)
|
||||
#define LED_on(x) pin_clear(x ## _port, x ## _pin)
|
||||
#define LED_off(x) pin_set(x ## _port, x ## _pin)
|
||||
#define LEDT_on(x) pin_set(LEDT ## x ## _port, LEDT ## x ## _pin)
|
||||
#define LEDT_off(x) pin_clear(LEDT ## x ## _port, LEDT ## x ## _pin)
|
||||
#define LEDT_blink(x) pin_toggle(LEDT ## x ## _port, LEDT ## x ## _pin)
|
||||
|
||||
// PA1 - USB On (in)
|
||||
#define USBisOn() (GPIOA->IDR & 1<<1)
|
||||
|
||||
Reference in New Issue
Block a user