mirror of
https://github.com/hathach/tinyusb.git
synced 2025-02-15 12:39:50 +00:00
Merge pull request #658 from lurch/patch-1
rp2040/family.c: allow LED_PIN to be undefined
This commit is contained in:
commit
f60380cdc8
@ -110,8 +110,10 @@ void stdio_rtt_init(void)
|
|||||||
|
|
||||||
void board_init(void)
|
void board_init(void)
|
||||||
{
|
{
|
||||||
|
#ifdef LED_PIN
|
||||||
gpio_init(LED_PIN);
|
gpio_init(LED_PIN);
|
||||||
gpio_set_dir(LED_PIN, GPIO_OUT);
|
gpio_set_dir(LED_PIN, GPIO_OUT);
|
||||||
|
#endif
|
||||||
|
|
||||||
// Button
|
// Button
|
||||||
#ifndef BUTTON_BOOTSEL
|
#ifndef BUTTON_BOOTSEL
|
||||||
@ -141,7 +143,9 @@ void board_init(void)
|
|||||||
|
|
||||||
void board_led_write(bool state)
|
void board_led_write(bool state)
|
||||||
{
|
{
|
||||||
|
#ifdef LED_PIN
|
||||||
gpio_put(LED_PIN, state ? LED_STATE_ON : (1-LED_STATE_ON));
|
gpio_put(LED_PIN, state ? LED_STATE_ON : (1-LED_STATE_ON));
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t board_button_read(void)
|
uint32_t board_button_read(void)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user