Nordic Semiconductor nRF5 AirFuel SDK  version 2.2.0
pru.h
Go to the documentation of this file.
1 /* Copyright (c) 2013 Nordic Semiconductor. All Rights Reserved.
2  *
3  * The information contained herein is property of Nordic Semiconductor ASA.
4  * Terms and conditions of usage are described in detail in NORDIC
5  * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT.
6  *
7  * Licensees are granted free, non-transferable use of the information. NO
8  * WARRANTY of ANY KIND is provided. This heading must NOT be removed from
9  * the file.
10  *
11  */
12 
20 #ifndef __PRU_H__
21 #define __PRU_H__
22 
23 #include "app_timer.h"
24 #include "ble_wpts.h"
25 #include "pru_sm.h"
26 #include "pru_config.h"
27 
28 typedef void (*app_sm_evt_handler_t)
29  (pru_sm_signal_type_t signal, const pru_sm_state_vars_t * p_state_vars);
31 typedef void (*pru_sm_handler_t)(pru_sm_signal_type_t evt);
33 #define APP_TIMER_PRESCALER 0
34 #define APP_TIMER_OP_QUEUE_SIZE 10
36 #if(PRU_CHARGE_COMPLETE_CONN_MODE_ENABLE)
37  #error PRU charge complete connected mode not implemented.
38 #endif
39 /******************************************************************************/
42 /******************************************************************************/
43 
48 void pru_init(app_sm_evt_handler_t sm_evt_handler);
49 
53 void pru_start(void);
54 
57 void pru_on_ble_evt(ble_evt_t * p_ble_evt);
58 
59 #ifdef DEBUG_OUT_ENABLE
60  void wpts_test_evt_handle_cb(ble_wpts_t * p_wpts, ble_wpts_evt_t * p_evt);
61 #endif //DEBUG_OUT_ENABLE
62 
65 #endif /* __PRU_H__ */
66 
State machine state variables.
Definition: pru_sm.h:55
void pru_on_ble_evt(ble_evt_t *p_ble_evt)
Handle BLE event.
Definition: pru.c:510
void pru_init(app_sm_evt_handler_t sm_evt_handler)
Initialize PRU. This function must be called before any other PRU function can be called...
Definition: pru.c:480
void wpts_test_evt_handle_cb(ble_wpts_t *p_wpts, ble_wpts_evt_t *p_evt)
Override weak wpts_test_evt_handle_cb()
Definition: pru_debug.c:77
void(* pru_sm_handler_t)(pru_sm_signal_type_t evt)
Definition: pru.h:31
void(* app_sm_evt_handler_t)(pru_sm_signal_type_t signal, const pru_sm_state_vars_t *p_state_vars)
Definition: pru.h:29
WPT Service event.
Definition: ble_wpts.h:41
pru_sm_signal_type_t
PRU state machine signal type.
Definition: pru_sm.h:36
void pru_start(void)
Enable the PRU profile. When enabled sensor reading and signal generation will be enabled...
Definition: pru.c:487
WPT Service status structure.
Definition: ble_wpts.h:71