embedded-software
reusable software modules for embedded systems
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Thief Module
Collaboration diagram for Thief Module:

Modules

 Thief Brainframe Module
 

Functions

void Thief_Trip (uint8_t score)
 send TRIP message over network to Brainframe More...
 
void Thief_Access (uint8_t score)
 send ACCESS message over network to Brainframe More...
 
void Thief_Error (uint8_t error_code)
 send ERROR message over network to Brainframe More...
 
void Thief_Init (void(*ChipEnable)(uint8_t), void(*ChipSelectNot)(uint8_t), void(*Arm)(void), void(*Disarm)(void), void(*Difficulty)(uint8_t))
 initialize the nRF24 Network module for the Thief node and set callbacks More...
 

Detailed Description

THIEF_SPI should be defined in project_settings.h

Function Documentation

void Thief_Access ( uint8_t  score)

send ACCESS message over network to Brainframe

Parameters
scorebyte (0 - score not used, 1 - great job, 255 - face palm)

Here is the call graph for this function:

void Thief_Error ( uint8_t  error_code)

send ERROR message over network to Brainframe

Parameters
error_codebyte (codes TBD)

Here is the call graph for this function:

void Thief_Init ( void(*)(uint8_t)  ChipEnable,
void(*)(uint8_t)  ChipSelectNot,
void(*)(void)  Arm,
void(*)(void)  Disarm,
void(*)(uint8_t)  Difficulty 
)

initialize the nRF24 Network module for the Thief node and set callbacks

Parameters
ChipEnableFunction pointer to method that controls chip enable pin via GPIO
ChipSelectNotFunction pointer to method that controls the SPI chip select for the nRF24L01+
Arm(optional)Function pointer to call when ARM message received from brainframe
Disarm(optional)Function pointer to call when DISARM message received from brainframe
Difficulty(optional) Function pointer to call when a non-zero difficulty value is received from the brainframe (1 - easy, 255 - freakin impossible)

Here is the call graph for this function:

Here is the caller graph for this function:

void Thief_Trip ( uint8_t  score)

send TRIP message over network to Brainframe

Parameters
scorebyte (0 - score not used, 1 - barely tripped, 255 - not trying)

Here is the call graph for this function: