max32630fthr: support for hal_led.h

This commit is contained in:
Matthias Ringwald 2017-08-17 10:47:34 +02:00
parent 0c2b8870c4
commit 24efff18d5
2 changed files with 16 additions and 0 deletions

View File

@ -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;

View File

@ -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();