Nordic Semiconductor nRF5 AirFuel SDK
version 2.2.0
Main Page
Related Pages
Modules
Data Structures
Files
File List
Globals
pru_sm.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
21
#ifndef PRU_SM_PRU_H__
22
#define PRU_SM_PRU_H__
23
24
26
typedef
enum
27
{
28
PRU_SM_STATE_NULL,
29
PRU_SM_STATE_BOOT,
30
PRU_SM_STATE_PRU_ON,
31
PRU_SM_STATE_SYSTEM_ERROR,
32
PRU_SM_STATE_COUNT
33
}
pru_sm_state_t
;
34
36
typedef
enum
37
{
38
PRU_SM_SIGNAL_NULL
,
39
PRU_SM_SIGNAL_CHARGE_START
,
40
PRU_SM_SIGNAL_CHARGE_STOP
,
41
PRU_SM_SIGNAL_POWER_APPLIED
,
42
PRU_SM_SIGNAL_POWER_REMOVED
,
43
PRU_SM_SIGNAL_CHARGE_COMPLETE
,
44
PRU_SM_SIGNAL_DISCONNECTED
,
45
PRU_SM_SIGNAL_SYSTEM_ERROR
,
46
PRU_SM_SIGNAL_COUNT
47
}
pru_sm_signal_type_t
;
48
49
/******************************************************************************/
52
/******************************************************************************/
53
55
typedef
struct
56
{
57
pru_sm_state_t
prev_state
;
58
pru_sm_state_t
current_state
;
59
pru_sm_state_t
next_state
;
60
}
pru_sm_state_vars_t
;
61
68
pru_sm_state_t
pru_sm_execute
(
pru_sm_signal_type_t
sig,
pru_sm_state_vars_t
* p_state);
69
70
72
#endif // PRU_SM_PRU_H__
73
74
//lint -restore
75
pru_sm_state_vars_t
State machine state variables.
Definition:
pru_sm.h:55
PRU_SM_SIGNAL_CHARGE_COMPLETE
Definition:
pru_sm.h:43
PRU_SM_SIGNAL_COUNT
Definition:
pru_sm.h:46
PRU_SM_SIGNAL_DISCONNECTED
Definition:
pru_sm.h:44
PRU_SM_SIGNAL_CHARGE_START
Definition:
pru_sm.h:39
pru_sm_state_t
pru_sm_state_t
PRU states.
Definition:
pru_sm.h:26
pru_sm_state_vars_t::prev_state
pru_sm_state_t prev_state
Definition:
pru_sm.h:57
pru_sm_state_vars_t::current_state
pru_sm_state_t current_state
Definition:
pru_sm.h:58
PRU_SM_SIGNAL_NULL
Definition:
pru_sm.h:38
PRU_SM_SIGNAL_POWER_REMOVED
Definition:
pru_sm.h:42
PRU_SM_SIGNAL_SYSTEM_ERROR
Definition:
pru_sm.h:45
PRU_SM_SIGNAL_POWER_APPLIED
Definition:
pru_sm.h:41
PRU_SM_SIGNAL_CHARGE_STOP
Definition:
pru_sm.h:40
pru_sm_signal_type_t
pru_sm_signal_type_t
PRU state machine signal type.
Definition:
pru_sm.h:36
pru_sm_state_vars_t::next_state
pru_sm_state_t next_state
Definition:
pru_sm.h:59
pru_sm_execute
pru_sm_state_t pru_sm_execute(pru_sm_signal_type_t sig, pru_sm_state_vars_t *p_state)
Execute state machine.
Definition:
pru_sm.c:71
Copyright ©
Nordic Semiconductor
. All Rights Reserved.
Disclaimer