Robot
The embedded systems for UTRA's autonomous humanoid soccer-playing robot
|
Implements low-level IO functions. More...
![]() |
Modules | |
Header | |
Private Functions | |
Functions only accessible from within the IO library. | |
Public functions | |
Functions accessible from outside this file. | |
Macros | |
#define | BUFF_SIZE_RX 8 |
#define | TX_PACKET_SIZE 9 |
#define | INST_PING 0x01 |
#define | INST_READ_DATA 0x02 |
#define | INST_WRITE_DATA 0x03 |
#define | INST_REG_WRITE 0x04 |
#define | INST_ACTION 0x05 |
#define | INST_RESET 0x06 |
#define | INST_SYNC_WRITE 0x83 |
Variables | |
static const uint32_t | TRANSMIT_TIMEOUT = 1 |
static const uint32_t | RECEIVE_TIMEOUT = 1 |
ioFlags_t | IOType = IO_POLL |
Configures the low-level I/O mode used by the library Default: polled I/O. | |
static uint8_t | arrReceive [NUM_MOTORS][BUFF_SIZE_RX] = {{0}} |
Pre-allocated buffer for reading in packets from motors. | |
static uint8_t | arrTransmit [NUM_MOTORS+1][TX_PACKET_SIZE] |
Pre-allocated buffer for transmitting packets to motors. More... | |
Implements low-level IO functions.
Provides a set of functions which provide flexible interfaces for transferring packets between motors and the MCU.
This driver uses polled I/O, interrupt-based I/O, or DMA-based I/O depending on the value of IOType. The user is responsible for ensuring their system configuration is appropriate when using interrupt-based or DMA-based I/O. For example, the interrupt-based mode assumes that the user has enabled interrupts for the UART module corresponding to this motor, and similarly, the DMA-based mode assumes that a DMA channel has been allocated. Both of these non-blocking modes also assumes the user is calling from within the context of a FreeRTOS thread, and that the callback function has been implemented to unblock the thread using task notifications.
#define BUFF_SIZE_RX 8 |
Receive buffer size for UART receptions (number of bytes)
Definition at line 42 of file DynamixelProtocolV1_IO.c.
#define INST_ACTION 0x05 |
Triggers instructions registered by INST_REG_WRITE
Definition at line 50 of file DynamixelProtocolV1_IO.c.
#define INST_PING 0x01 |
Gets a status packet
Definition at line 46 of file DynamixelProtocolV1_IO.c.
#define INST_READ_DATA 0x02 |
Reads data from a motor register
Definition at line 47 of file DynamixelProtocolV1_IO.c.
#define INST_REG_WRITE 0x04 |
Registers an instruction to be executed at a later time
Definition at line 49 of file DynamixelProtocolV1_IO.c.
#define INST_RESET 0x06 |
Resets the control tables of the Dynamixel actuator(s) specified
Definition at line 51 of file DynamixelProtocolV1_IO.c.
#define INST_SYNC_WRITE 0x83 |
Writes on a specified address with a specified data length on multiple devices
Definition at line 52 of file DynamixelProtocolV1_IO.c.
#define INST_WRITE_DATA 0x03 |
Writes data for immediate execution
Definition at line 48 of file DynamixelProtocolV1_IO.c.
#define TX_PACKET_SIZE 9 |
Maximum packet size for regular motor commands (exclusion: sync write)
Definition at line 43 of file DynamixelProtocolV1_IO.c.
|
static |
Pre-allocated buffer for transmitting packets to motors.
Definition at line 82 of file DynamixelProtocolV1_IO.c.
|
static |
Timeout for blocking UART receptions, in milliseconds
Definition at line 62 of file DynamixelProtocolV1_IO.c.
|
static |
Timeout for blocking UART transmissions, in milliseconds
Definition at line 59 of file DynamixelProtocolV1_IO.c.