Speeduino
Loading...
Searching...
No Matches
Macros | Functions | Variables
utilities.h File Reference
#include <Arduino.h>
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define CONCATS(s1, s2)   (s1" " s2)
 
#define COMPARATOR_EQUAL   0
 
#define COMPARATOR_NOT_EQUAL   1
 
#define COMPARATOR_GREATER   2
 
#define COMPARATOR_GREATER_EQUAL   3
 
#define COMPARATOR_LESS   4
 
#define COMPARATOR_LESS_EQUAL   5
 
#define COMPARATOR_AND   6
 
#define COMPARATOR_XOR   7
 
#define BITWISE_DISABLED   0
 
#define BITWISE_AND   1
 
#define BITWISE_OR   2
 
#define BITWISE_XOR   3
 
#define REUSE_RULES   240
 
#define UNUSED(x)   (void)(x)
 
#define _countof(x)   (sizeof(x) / sizeof (x[0]))
 
#define _end_range_address(array)   (array + _countof(array))
 
#define _end_range_byte_address(array)   (((byte*)array) + sizeof(array))
 
#define PP_INC(x)   PP_INC_I(x)
 
#define PP_INC_I(x)   PP_INC_ ## x
 
#define PP_INC_0   1
 
#define PP_INC_1   2
 
#define PP_INC_2   3
 
#define PP_INC_3   4
 
#define PP_INC_4   5
 
#define PP_INC_5   6
 
#define PP_INC_6   7
 
#define PP_INC_7   8
 
#define PP_INC_8   9
 
#define PP_INC_9   10
 
#define PP_INC_10   11
 
#define PP_INC_11   12
 
#define PP_INC_12   13
 

Functions

void setResetControlPinState (void)
 
byte pinTranslate (byte rawPin)
 
byte pinTranslateAnalog (byte rawPin)
 
void initialiseProgrammableIO (void)
 
void checkProgrammableIO (void)
 
int16_t ProgrammableIOGetData (uint16_t index)
 

Variables

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

Macro Definition Documentation

◆ _countof

#define _countof (   x)    (sizeof(x) / sizeof (x[0]))

◆ _end_range_address

#define _end_range_address (   array)    (array + _countof(array))

◆ _end_range_byte_address

#define _end_range_byte_address (   array)    (((byte*)array) + sizeof(array))

◆ BITWISE_AND

#define BITWISE_AND   1

◆ BITWISE_DISABLED

#define BITWISE_DISABLED   0

◆ BITWISE_OR

#define BITWISE_OR   2

◆ BITWISE_XOR

#define BITWISE_XOR   3

◆ COMPARATOR_AND

#define COMPARATOR_AND   6

◆ COMPARATOR_EQUAL

#define COMPARATOR_EQUAL   0

◆ COMPARATOR_GREATER

#define COMPARATOR_GREATER   2

◆ COMPARATOR_GREATER_EQUAL

#define COMPARATOR_GREATER_EQUAL   3

◆ COMPARATOR_LESS

#define COMPARATOR_LESS   4

◆ COMPARATOR_LESS_EQUAL

#define COMPARATOR_LESS_EQUAL   5

◆ COMPARATOR_NOT_EQUAL

#define COMPARATOR_NOT_EQUAL   1

◆ COMPARATOR_XOR

#define COMPARATOR_XOR   7

◆ CONCATS

#define CONCATS (   s1,
  s2 
)    (s1" " s2)

◆ PP_INC

#define PP_INC (   x)    PP_INC_I(x)

◆ PP_INC_0

#define PP_INC_0   1

◆ PP_INC_1

#define PP_INC_1   2

◆ PP_INC_10

#define PP_INC_10   11

◆ PP_INC_11

#define PP_INC_11   12

◆ PP_INC_12

#define PP_INC_12   13

◆ PP_INC_2

#define PP_INC_2   3

◆ PP_INC_3

#define PP_INC_3   4

◆ PP_INC_4

#define PP_INC_4   5

◆ PP_INC_5

#define PP_INC_5   6

◆ PP_INC_6

#define PP_INC_6   7

◆ PP_INC_7

#define PP_INC_7   8

◆ PP_INC_8

#define PP_INC_8   9

◆ PP_INC_9

#define PP_INC_9   10

◆ PP_INC_I

#define PP_INC_I (   x)    PP_INC_ ## x

◆ REUSE_RULES

#define REUSE_RULES   240

◆ UNUSED

#define UNUSED (   x)    (void)(x)

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:

◆ pinTranslate()

byte pinTranslate ( byte  rawPin)

Translate between the pin list that appears in TS and the actual pin numbers. For the digital IO, this will simply return the same number as the rawPin value as those are mapped directly. For analog pins, it will translate them into the correct internal pin number.

Parameters
rawPin- High level pin number
Returns
Translated / usable pin number
Here is the call graph for this function:
Here is the caller graph for this function:

◆ pinTranslateAnalog()

byte pinTranslateAnalog ( byte  rawPin)

Translate a pin number (0 - 22) to the relevant Ax (analog) pin reference. This is required as some ARM chips do not have all analog pins in order (EG pin A15 != A14 + 1).

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:

◆ setResetControlPinState()

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

Variable Documentation

◆ currentRuleStatus

uint8_t currentRuleStatus
extern

◆ ioDelay

uint8_t ioDelay[sizeof(configPage13.outputPin)]
extern

◆ ioOutDelay

uint8_t ioOutDelay[sizeof(configPage13.outputPin)]
extern

◆ pinIsValid

uint8_t pinIsValid
extern