Speeduino
Loading...
Searching...
No Matches
Functions | Variables
utilities.cpp File Reference
#include <avr/pgmspace.h>
#include "globals.h"
#include "utilities.h"
#include "decoders.h"
#include "comms.h"
#include "logger.h"
#include "scheduler.h"
#include "units.h"

Functions

void initialiseProgrammableIO (void)
 
void checkProgrammableIO (void)
 
int16_t ProgrammableIOGetData (uint16_t index)
 

Variables

uint8_t ioDelay [sizeof(configPage13.outputPin)]
 
uint8_t ioOutDelay [sizeof(configPage13.outputPin)]
 
uint8_t pinIsValid = 0
 
uint8_t currentRuleStatus = 0
 

Detailed Description

Custom Programmable I/O. The config related to Programmable I/O is found on configPage13 (of type config13).

Function Documentation

◆ checkProgrammableIO()

void checkProgrammableIO ( void  )

Check all (8) programmable I/O:s and carry out action on output pin as needed. Compare 2 (16 bit) vars in a way configured by cmpOperation (see also config13::operation). Use ProgrammableIOGetData() to get 2 vars to compare. Skip all programmable I/O:s where output pin is set 0 (meaning: not programmed).

Here is the call graph for this function:
Here is the caller graph for this function:

◆ initialiseProgrammableIO()

void initialiseProgrammableIO ( void  )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ProgrammableIOGetData()

int16_t ProgrammableIOGetData ( uint16_t  index)

Get single I/O data var (from currentStatus) for comparison.

Parameters
index- Field index/number (?)
Returns
16 bit (int) result
Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ currentRuleStatus

uint8_t currentRuleStatus = 0

◆ ioDelay

uint8_t ioDelay[sizeof(configPage13.outputPin)]

◆ ioOutDelay

uint8_t ioOutDelay[sizeof(configPage13.outputPin)]

◆ pinIsValid

uint8_t pinIsValid = 0