34 #include "hal_clocks.h" 35 #include "hal_nop_delay.h" 37 #include "common_util.h" 38 #include "tinyprintf.h" 39 #include "uart_printf.h" 44 #include "profiler_timer.h" 47 static void rgb_led_init(
void)
55 static void rgb_led_cycle(
void)
60 hal_nop_delay_ms(250);
64 hal_nop_delay_ms(250);
68 hal_nop_delay_ms(250);
74 static void log_dump_handler(
void){
76 static uint8_t count = 0;
78 uint8_t adv_data[] = {
80 0x02, GAP_ADV_FLAGS, 0x04,
81 0x04, GAP_ADV_NAME_FULL,
'E',
'f',
'H',
96 tfp_printf(
"Hello World %d!\n", 42);
105 uint8_t adrs[] = {0x0B, 0x0E, 0x0A, 0x0C, 0x00, 0x01};
106 uint8_t adv_data[] = {
108 0x02, GAP_ADV_FLAGS, 0x04,
109 0x04, GAP_ADV_NAME_FULL,
'E',
'f',
'H',
110 0x02, GAP_ADV_MANUF_DATA, 0
113 uint8_t scan_rsp[] = {
114 0x02, GAP_ADV_TRANSMIT_PWR, 0
void profiler_timer_init(void)
void ble_adv_start(void)
Start advertising based on the parameters set.
void ble_adv_set_tx_power(int8_t pwr)
Set the advertising transmission power in dBm.
#define ADV_INTERVAL_MS(x)
void us_timer_init(uint32_t irq_priority)
Initialize the TIMER peripheral to use as a micro-second timer.
#define LEDS_ACTIVE_STATE
void lfclk_init(lfclk_src_t lfclk_src)
Function to initialize the LF clock.
Repeated call of the timer.
void ble_adv_set_adv_param(ble_adv_param_t *adv_param)
Set the advertising parameters to be used.
void ms_timer_init(uint32_t irq_priority)
void uart_printf_init(uart_printf_baud_t baud_rate)
Function to initialize the parameters of UART based on the configurations in boards....
void ble_adv_set_scan_rsp_data(uint8_t len, uint8_t *data_ptr)
Set the scan response data.
void ms_timer_start(ms_timer_num id, ms_timer_mode mode, uint64_t ticks, void(*handler)(void))
void ble_adv_set_random_adrs(uint8_t *rand_adrs)
Set the random address to be used.
The structure format for setting the advertisement parameters.
void hfclk_xtal_init_blocking(void)
Function to start the crystal oscillator to be used for HF clock. This function blocks until the crys...
int main(void)
Function for application main entry.
void ble_adv_set_adv_data(uint8_t len, uint8_t *data_ptr)
Set the advertising data.