![]() |
Speeduino
|
#include "auxChannelController.h"#include "auxChannelController_detail.h"#include "src/pins/pinMapping.h"#include "unit_testing.h"#include "sensors.h"#include "comms_secondary.h"#include "globals.h"Typedefs | |
| using | fnSendCanCommand_t = void(*)(uint8_t cmdtype, uint16_t canaddress, uint8_t candata1, uint8_t candata2, uint16_t sourcecanAddress) |
| using | fnReadAuxanalog_t = uint16_t(*)(uint8_t analogPin) |
| using | fnReadAuxdigital_t = decltype(&digitalRead) |
Functions | |
| static bool | isExternalInput (uint8_t selector) |
| static bool | isAnalogInput (uint8_t selector) |
| static uint8_t | getAnalogPin (uint8_t channel, const config9 &page9) |
| static bool | isDigitalInput (uint8_t selector) |
| static uint8_t | getDigitalPin (uint8_t channel, const config9 &page9) |
| void | initAuxChannels (statuses ¤t, const config9 &page9) |
| TESTABLE_STATIC void | auxChannelControl (statuses ¤t, const config9 &page9, fnSendCanCommand_t fnSendCanCommand, fnReadAuxanalog_t fnReadAuxanalog, fnReadAuxdigital_t fnReadAuxdigital) |
| void | auxChannelControl (statuses ¤t, const config9 &page9) |
Variables | |
| TESTABLE_STATIC state | _auxState |
| constexpr uint8_t | MASK_SELECTORA = 0b00000011 |
| constexpr uint8_t | SELECTORA_ANALOG = 0b00000010 |
| constexpr uint8_t | SELECTORA_DIGITAL = 0b00000011 |
| constexpr uint8_t | MASK_SELECTORB = 0b00001100 |
| constexpr uint8_t | SELECTORB_EXTERNAL = 0b00000100 |
| constexpr uint8_t | SELECTORB_ANALOG = 0b00001000 |
| constexpr uint8_t | SELECTORB_DIGITAL = 0b00001100 |
| constexpr uint8_t | MASK_SOURCEA = 0b00100000 |
| constexpr uint8_t | MASK_SOURCEB = 0b01000000 |
| constexpr uint8_t | SOURCEB_SECONDARY_SERIAL = 0b00000000 |
| constexpr uint8_t | SOURCEB_INTERNAL_CAN = 0b01000000 |
| constexpr uint8_t | MASK_SOURCEC = 0b10000000 |
| constexpr uint8_t | SOURCEC_INTERNAL_CAN = 0b10000000 |
| constexpr uint8_t | MASK_ANALOG_PIN = 0b00111111 |
| constexpr uint8_t | MASK_DIGITAL_PIN = 0b00111111 |
| constexpr uint16_t | MASK_SOURCE_ADDRESS = 0b0000'0111'1111'1111 |
| using fnReadAuxanalog_t = uint16_t (*)(uint8_t analogPin) |
| using fnReadAuxdigital_t = decltype(&digitalRead) |
| using fnSendCanCommand_t = void (*)(uint8_t cmdtype, uint16_t canaddress, uint8_t candata1, uint8_t candata2, uint16_t sourcecanAddress) |
| TESTABLE_STATIC void auxChannelControl | ( | statuses & | current, |
| const config9 & | page9, | ||
| fnSendCanCommand_t | fnSendCanCommand, | ||
| fnReadAuxanalog_t | fnReadAuxanalog, | ||
| fnReadAuxdigital_t | fnReadAuxdigital | ||
| ) |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
| TESTABLE_STATIC state _auxState |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |