mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-04-16 08:42:28 +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_OFF 1 /// Inactive state of LEDs
|
||||||
#define LED_ON 0 /// Active 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
|
// Console UART configuration
|
||||||
extern const uart_cfg_t console_uart_cfg;
|
extern const uart_cfg_t console_uart_cfg;
|
||||||
extern const sys_cfg_uart_t console_sys_cfg;
|
extern const sys_cfg_uart_t console_sys_cfg;
|
||||||
|
@ -38,6 +38,7 @@
|
|||||||
#include "lp.h"
|
#include "lp.h"
|
||||||
#include "uart.h"
|
#include "uart.h"
|
||||||
#include "board.h"
|
#include "board.h"
|
||||||
|
#include "led.h"
|
||||||
#include "btstack_debug.h"
|
#include "btstack_debug.h"
|
||||||
|
|
||||||
#include "btstack.h"
|
#include "btstack.h"
|
||||||
@ -70,6 +71,8 @@ static void dummy_handler(void) {};
|
|||||||
static void (*rx_done_handler)(void) = dummy_handler;
|
static void (*rx_done_handler)(void) = dummy_handler;
|
||||||
static void (*tx_done_handler)(void) = dummy_handler;
|
static void (*tx_done_handler)(void) = dummy_handler;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void hal_cpu_disable_irqs(void)
|
void hal_cpu_disable_irqs(void)
|
||||||
{
|
{
|
||||||
__disable_irq();
|
__disable_irq();
|
||||||
@ -269,10 +272,15 @@ static hci_transport_config_uart_t config = {
|
|||||||
// hal_led.h implementation
|
// hal_led.h implementation
|
||||||
#include "hal_led.h"
|
#include "hal_led.h"
|
||||||
void hal_led_off(void){
|
void hal_led_off(void){
|
||||||
|
LED_Off(LED_BLUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
void hal_led_on(void){
|
void hal_led_on(void){
|
||||||
|
LED_On(LED_BLUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
void hal_led_toggle(void){
|
void hal_led_toggle(void){
|
||||||
|
LED_Toggle(LED_BLUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
#include "hal_flash_bank_mxc.h"
|
#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)
|
int bluetooth_main(void)
|
||||||
{
|
{
|
||||||
|
LED_Off(LED_GREEN);
|
||||||
|
LED_On(LED_RED);
|
||||||
|
LED_Off(LED_BLUE);
|
||||||
|
|
||||||
bt_comm_init();
|
bt_comm_init();
|
||||||
/* BT Stack Initialization */
|
/* BT Stack Initialization */
|
||||||
btstack_memory_init();
|
btstack_memory_init();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user