Skip to content

Commit 0112e3f

Browse files
committed
Fix LED driver of examples.
1 parent 2a02436 commit 0112e3f

5 files changed

Lines changed: 10 additions & 1 deletion

File tree

build/example/driver/nxpimxrt1050/led.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
#include "board.h"
1212
#include "../led.h"
1313

14+
using namespace bsp;
15+
1416
void Led::Init(Id led, bool init_state)
1517
{
1618
uint8_t logic_state = (init_state ? LOGIC_LED_ON : LOGIC_LED_OFF);

build/example/driver/nxpk66/led.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
#include "board.h"
1212
#include "../led.h"
1313

14+
using namespace bsp;
15+
1416
void Led::Init(Id led, bool init_state)
1517
{
1618
uint8_t logic_state = (init_state ? LOGIC_LED_ON : LOGIC_LED_OFF);
@@ -21,7 +23,6 @@ void Led::Init(Id led, bool init_state)
2123
case Led::GREEN: LED_GREEN_INIT(logic_state); break;
2224
case Led::BLUE: LED_BLUE_INIT(logic_state); break;
2325
default:
24-
assert(false);
2526
break;
2627
}
2728
}

build/example/driver/rp2350w/cpu.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919

2020
#include "../cpu.h"
2121

22+
using namespace bsp;
23+
2224
void Cpu::Start(uint8_t cpu_id, void (*entry_func)(void))
2325
{
2426
assert(cpu_id < 2);

build/example/driver/stm32f0xx/led.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
#include "stm32f0xx_hal_gpio.h"
1313
#include "../led.h"
1414

15+
using namespace bsp;
16+
1517
#define LED_PORT GPIOC
1618

1719
static void Led_InitGpio(uint16_t pin)

build/example/driver/stm32f1xx/led.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
#include "stm32f1xx_hal_gpio.h"
1313
#include "../led.h"
1414

15+
using namespace bsp;
16+
1517
#define LED_PORT GPIOA
1618

1719
static void Led_InitGpio(int32_t pin)

0 commit comments

Comments
 (0)