mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-02-20 18:40:31 +00:00
max32630fthr: support for hal_led.h
This commit is contained in:
parent
0c2b8870c4
commit
24efff18d5
@ -66,6 +66,10 @@ extern "C" {
|
||||
#define LED_OFF 1 /// Inactive state of LEDs
|
||||
#define LED_ON 0 /// Active state of LEDs
|
||||
|
||||
#define LED_RED (0) /* (&led_pin[0]) */
|
||||
#define LED_GREEN (1) /* &led_pin[1] */
|
||||
#define LED_BLUE (2) /* led_pin[2] */
|
||||
|
||||
// Console UART configuration
|
||||
extern const uart_cfg_t console_uart_cfg;
|
||||
extern const sys_cfg_uart_t console_sys_cfg;
|
||||
|
@ -38,6 +38,7 @@
|
||||
#include "lp.h"
|
||||
#include "uart.h"
|
||||
#include "board.h"
|
||||
#include "led.h"
|
||||
#include "btstack_debug.h"
|
||||
|
||||
#include "btstack.h"
|
||||
@ -70,6 +71,8 @@ static void dummy_handler(void) {};
|
||||
static void (*rx_done_handler)(void) = dummy_handler;
|
||||
static void (*tx_done_handler)(void) = dummy_handler;
|
||||
|
||||
|
||||
|
||||
void hal_cpu_disable_irqs(void)
|
||||
{
|
||||
__disable_irq();
|
||||
@ -269,10 +272,15 @@ static hci_transport_config_uart_t config = {
|
||||
// hal_led.h implementation
|
||||
#include "hal_led.h"
|
||||
void hal_led_off(void){
|
||||
LED_Off(LED_BLUE);
|
||||
}
|
||||
|
||||
void hal_led_on(void){
|
||||
LED_On(LED_BLUE);
|
||||
}
|
||||
|
||||
void hal_led_toggle(void){
|
||||
LED_Toggle(LED_BLUE);
|
||||
}
|
||||
|
||||
#include "hal_flash_bank_mxc.h"
|
||||
@ -290,6 +298,10 @@ static btstack_tlv_flash_bank_t btstack_tlv_flash_bank_context;
|
||||
|
||||
int bluetooth_main(void)
|
||||
{
|
||||
LED_Off(LED_GREEN);
|
||||
LED_On(LED_RED);
|
||||
LED_Off(LED_BLUE);
|
||||
|
||||
bt_comm_init();
|
||||
/* BT Stack Initialization */
|
||||
btstack_memory_init();
|
||||
|
Loading…
x
Reference in New Issue
Block a user