35 #include "hal_clocks.h" 39 #include "hal_nop_delay.h" 42 #include "pin_trace.h" 45 #include "radio_drv.h" 46 #include "cc1x_utils.h" 47 #include "cc112x_def.h" 48 #include "spi_rf_nrf52.h" 97 #define GPIOTE_CHANNEL_USED 0 99 #define GPIO_PIN GPIO0 109 void ms_timer_handler ()
136 static void rgb_led_init(
void)
144 static void rgb_led_cycle(
void)
149 hal_nop_delay_ms(250);
153 hal_nop_delay_ms(250);
157 hal_nop_delay_ms(250);
163 void ms_timer_10ms (
void)
188 log_printf(
"%s\n",__func__);
190 hal_gpio_pin_toggle (LED_RED);
192 if(radio_check_status_flag (MARC_NO_FAILURE) )
194 log_printf(
"Data sent\n");
196 trxSpiCmdStrobe (SFTX);
210 log_printf(
"Hello World from Long range RF Comm..!!\n");
222 radio_set_freq (915000);
225 set_rf_packet_length (
sizeof(
test_cnt));
226 log_printf(
"Here..!!\n");
227 hal_gpio_cfg_output (PA_EN_PIN, 1);
230 NRF_GPIOTE->CONFIG[
GPIOTE_CHANNEL_USED] = ((GPIOTE_CONFIG_MODE_Event << GPIOTE_CONFIG_MODE_Pos) & GPIOTE_CONFIG_MODE_Msk) |
231 ((GPIOTE_CONFIG_POLARITY_HiToLo << GPIOTE_CONFIG_POLARITY_Pos)&GPIOTE_CONFIG_POLARITY_Msk) |
232 ((GPIO_PIN << GPIOTE_CONFIG_PSEL_Pos) & GPIOTE_CONFIG_PSEL_Msk);
233 NRF_GPIOTE->INTENSET = (GPIOTE_INTENSET_IN0_Enabled<<GPIOTE_INTENSET_IN0_Pos)&GPIOTE_INTENSET_IN0_Msk;
238 NVIC_SetPriority (GPIOTE_IRQn, APP_IRQ_PRIORITY_LOW);
239 NVIC_ClearPendingIRQ (GPIOTE_IRQn);
240 NVIC_EnableIRQ (GPIOTE_IRQn);
Common configuration header file.
#define GPIOTE_CHANNEL_USED
Radio structure fitting.
#define LEDS_ACTIVE_STATE
void lfclk_init(lfclk_src_t lfclk_src)
Function to initialize the LF clock.
Repeated call of the timer.
#define MS_TIMER_TICKS_MS(ms)
void ms_timer_init(uint32_t irq_priority)
volatile uint16_t test_cnt
IRQ status struct declaration.
S2LP Configuration and useful defines .
void ms_timer_start(ms_timer_num id, ms_timer_mode mode, uint64_t ticks, void(*handler)(void))
int main(void)
Function for application main entry.