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

Functions

void Thief_Arm (uint8_t difficulty, uint8_t address)
 send ARM message over network to a theif node More...
 
void Thief_Disarm (uint8_t difficulty, uint8_t address)
 send DISARM message over network to a theif node More...
 
void Thief_Difficulty (uint8_t difficulty, uint8_t address)
 send DIFFICULTY message over network to a theif node More...
 
void Thief_BrainframeInit (void(*ChipEnable)(uint8_t), void(*ChipSelectNot)(uint8_t), void(*Trip)(uint8_t, uint8_t), void(*Access)(uint8_t, uint8_t))
 initialize the nRF24 Network module for the Thief Brainframe and set callbacks More...
 

Detailed Description

THIEF_SPI should be defined in project_settings.h

This module will be used by the brainframe application and by Thief nodes for testing without the actual brainframe present.

Function Documentation

void Thief_Arm ( uint8_t  difficulty,
uint8_t  address 
)

send ARM message over network to a theif node

Parameters
difficultydifficulty byte (0 - no change, 1 - easy peasy, 255 - too hard)
addressnode address (0x3F for broadcast to all)

Here is the call graph for this function:

void Thief_BrainframeInit ( void(*)(uint8_t)  ChipEnable,
void(*)(uint8_t)  ChipSelectNot,
void(*)(uint8_t, uint8_t)  Trip,
void(*)(uint8_t, uint8_t)  Access 
)

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

If using brainframe for testing (e.g. already using the default nrf24 network for Thief_Init) then define THIEF_BRAINFRAME_NETWORK in project_settings.h to be the nrf24network pointer for the brainframe network instance.

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+
Trip(optional)Function pointer to call when TRIP message received from Thief node
Access(optional)Function pointer to call when ACCESS message received from Thief node

Here is the call graph for this function:

Here is the caller graph for this function:

void Thief_Difficulty ( uint8_t  difficulty,
uint8_t  address 
)

send DIFFICULTY message over network to a theif node

Parameters
difficultydifficulty byte (0 - no change, 1 - easy peasy, 255 - too hard)
addressnode address (0x3F for broadcast to all)

Here is the call graph for this function:

void Thief_Disarm ( uint8_t  difficulty,
uint8_t  address 
)

send DISARM message over network to a theif node

Parameters
difficultydifficulty byte (0 - no change, 1 - easy peasy, 255 - too hard)
addressnode address (0x3F for broadcast to all)

Here is the call graph for this function: