|
Modmata
v0
An arduino communications server using Modbus
|
Define standard callback functions to control Arduino I/O. More...
#include "Functions.h"
Go to the source code of this file.
Functions | |
| struct registers | pinMode (uint8_t argc, uint8_t *argv) |
| Change the settings of the Arduino I/O pins. More... | |
| struct registers | digitalWrite (uint8_t argc, uint8_t *argv) |
| Write a digital (HIGH/LOW) value to the Arduino I/O pins. More... | |
| struct registers | digitalRead (uint8_t argc, uint8_t *argv) |
| Read a digital value (HIGH/LOW) from the Arduino I/O pins. More... | |
| struct registers | analogWrite (uint8_t argc, uint8_t *argv) |
| Write an analog value (0-255) to the Arduino I/O pins. More... | |
| struct registers | analogRead (uint8_t argc, uint8_t *argv) |
| Read an analog value (0-1023) from the Arduino I/O pins. More... | |
| struct registers | servoAttach (uint8_t argc, uint8_t *argv) |
| Attach a connected servo to a control interface. More... | |
| struct registers | servoDetach (uint8_t argc, uint8_t *argv) |
| Detach a servo from the the control interface. More... | |
| struct registers | servoWrite (uint8_t argc, uint8_t *argv) |
| Write a value to the connected servo. More... | |
| struct registers | servoRead (uint8_t argc, uint8_t *argv) |
| Read a value from the connected servo. More... | |
| struct registers | wireBegin (uint8_t argc, uint8_t *argv) |
| Begin an I2C connection between the Arduino and a peripheral. More... | |
| struct registers | wireEnd (uint8_t argc, uint8_t *argv) |
| End an I2C connection between the Arduino and a peripheral. More... | |
| struct registers | wireSetClock (uint8_t argc, uint8_t *argv) |
| Change the clock speed settings of the I2C connection. More... | |
| struct registers | wireWrite (uint8_t argc, uint8_t *argv) |
| Write data to the connected I2C peripheral. More... | |
| struct registers | wireRead (uint8_t argc, uint8_t *argv) |
| Read data from the connected I2C peripheral. More... | |
| struct registers | spiBegin (uint8_t argc, uint8_t *argv) |
| Begin a SPI connection between the Arduino and a peripheral. More... | |
| struct registers | spiSettings (uint8_t argc, uint8_t *argv) |
| Change the settings of the SPI connection. More... | |
| struct registers | spiTransferBuf (uint8_t argc, uint8_t *argv) |
| Exchange data over the SPI connection (Read + Write) More... | |
| struct registers | spiEnd (uint8_t argc, uint8_t *argv) |
| End a SPI connection between the Arduino and a peripheral. More... | |
Variables | |
| int | servo_count = 0 |
| Current number of attached servos. | |
| Servo | servos [14] |
| Array to control attached servos. | |
| struct spi_settings | settings |
| Singleton to represent the current SPI connection settings. | |
| const registers | VOID_STRUCT {0, nullptr} |
| Helper struct that is returned directly when a callback function has no return values, and that is copy-constructed from when a clean struct is needed to populate with values. | |
Define standard callback functions to control Arduino I/O.
Definition in file Functions.cpp.
| struct registers analogRead | ( | uint8_t | argc, |
| uint8_t * | argv | ||
| ) |
Read an analog value (0-1023) from the Arduino I/O pins.
| argc | The number of arguments contained within the 'argv' array (1) |
| argv | The arguments to use within the function (pin #) |
Definition at line 29 of file Functions.cpp.
| struct registers analogWrite | ( | uint8_t | argc, |
| uint8_t * | argv | ||
| ) |
Write an analog value (0-255) to the Arduino I/O pins.
| argc | The number of arguments contained within the 'argv' array (3) |
| argv | The arguments to use within the function (pin #, 16-bit value split into 2 8-bit values) |
Definition at line 29 of file Functions.cpp.
| struct registers digitalRead | ( | uint8_t | argc, |
| uint8_t * | argv | ||
| ) |
Read a digital value (HIGH/LOW) from the Arduino I/O pins.
| argc | The number of arguments contained within the 'argv' array (1) |
| argv | The arguments to use within the function (pin #) |
Definition at line 29 of file Functions.cpp.
| struct registers digitalWrite | ( | uint8_t | argc, |
| uint8_t * | argv | ||
| ) |
Write a digital (HIGH/LOW) value to the Arduino I/O pins.
| argc | The number of arguments contained within the 'argv' array (2) |
| argv | The arguments to use within the function (pin #, value) |
Definition at line 29 of file Functions.cpp.
| struct registers pinMode | ( | uint8_t | argc, |
| uint8_t * | argv | ||
| ) |
Change the settings of the Arduino I/O pins.
| argc | The number of arguments contained within the 'argv' array (2) |
| argv | The arguments to use within the function (pin #, mode) |
Definition at line 29 of file Functions.cpp.
| struct registers servoAttach | ( | uint8_t | argc, |
| uint8_t * | argv | ||
| ) |
Attach a connected servo to a control interface.
| argc | The number of arguments contained within the 'argv' array (1) |
| argv | The arguments to use within the function (pin #) |
Definition at line 29 of file Functions.cpp.
| struct registers servoDetach | ( | uint8_t | argc, |
| uint8_t * | argv | ||
| ) |
Detach a servo from the the control interface.
| argc | The number of arguments contained within the 'argv' array (1) |
| argv | The arguments to use within the function (pin #) |
Definition at line 29 of file Functions.cpp.
| struct registers servoRead | ( | uint8_t | argc, |
| uint8_t * | argv | ||
| ) |
Read a value from the connected servo.
| argc | The number of arguments contained within the 'argv' array |
| argv | The arguments to use within the function |
Definition at line 29 of file Functions.cpp.
| struct registers servoWrite | ( | uint8_t | argc, |
| uint8_t * | argv | ||
| ) |
Write a value to the connected servo.
| argc | The number of arguments contained within the 'argv' array (2) |
| argv | The arguments to use within the function (pin #, value) |
Definition at line 29 of file Functions.cpp.
| struct registers spiBegin | ( | uint8_t | argc, |
| uint8_t * | argv | ||
| ) |
Begin a SPI connection between the Arduino and a peripheral.
| argc | The number of arguments contained within the 'argv' array |
| argv | The arguments to use within the function |
Definition at line 29 of file Functions.cpp.
| struct registers spiEnd | ( | uint8_t | argc, |
| uint8_t * | argv | ||
| ) |
End a SPI connection between the Arduino and a peripheral.
| argc | The number of arguments contained within the 'argv' array (0) |
| argv | The arguments to use within the function (None) |
Definition at line 29 of file Functions.cpp.
| struct registers spiSettings | ( | uint8_t | argc, |
| uint8_t * | argv | ||
| ) |
Change the settings of the SPI connection.
| argc | The number of arguments contained within the 'argv' array |
| argv | The arguments to use within the function |
Definition at line 29 of file Functions.cpp.
| struct registers spiTransferBuf | ( | uint8_t | argc, |
| uint8_t * | argv | ||
| ) |
Exchange data over the SPI connection (Read + Write)
| argc | The number of arguments contained within the 'argv' array |
| argv | The arguments to use within the function |
Definition at line 29 of file Functions.cpp.
| struct registers wireBegin | ( | uint8_t | argc, |
| uint8_t * | argv | ||
| ) |
Begin an I2C connection between the Arduino and a peripheral.
| argc | The number of arguments contained within the 'argv' array |
| argv | The arguments to use within the function |
Definition at line 29 of file Functions.cpp.
| struct registers wireEnd | ( | uint8_t | argc, |
| uint8_t * | argv | ||
| ) |
End an I2C connection between the Arduino and a peripheral.
| argc | The number of arguments contained within the 'argv' array |
| argv | The arguments to use within the function |
Definition at line 29 of file Functions.cpp.
| struct registers wireRead | ( | uint8_t | argc, |
| uint8_t * | argv | ||
| ) |
Read data from the connected I2C peripheral.
| argc | The number of arguments contained within the 'argv' array |
| argv | The arguments to use within the function |
Definition at line 29 of file Functions.cpp.
| struct registers wireSetClock | ( | uint8_t | argc, |
| uint8_t * | argv | ||
| ) |
Change the clock speed settings of the I2C connection.
| argc | The number of arguments contained within the 'argv' array |
| argv | The arguments to use within the function |
Definition at line 29 of file Functions.cpp.
| struct registers wireWrite | ( | uint8_t | argc, |
| uint8_t * | argv | ||
| ) |
Write data to the connected I2C peripheral.
| argc | The number of arguments contained within the 'argv' array |
| argv | The arguments to use within the function |
Definition at line 29 of file Functions.cpp.