TODO.
More...
Go to the source code of this file.
|
| volatile amu_device_t * | amu_dev_init (amu_transfer_fptr_t transfer_ptr) |
| | TODO.
|
| int8_t | amu_dev_transfer (uint8_t address, uint8_t reg, uint8_t *data, size_t len, uint8_t rw) |
| | Transfering... TODO.
|
| uint8_t | amu_dev_busy (uint8_t address) |
| | Checks to see if the AMU device is busy.
|
| int8_t | amu_dev_send_command (uint8_t address, CMD_t command) |
| | Sends a command to an AMU device.
|
| int8_t | amu_dev_send_command_data (uint8_t address, CMD_t command, uint8_t len) |
| | Move local transfer reg to remote transfer reg, then send command.
|
| int8_t | amu_dev_query_command (uint8_t address, CMD_t command, uint8_t commandDataLen, uint8_t responseLength) |
| | TODO.
|
| uint8_t | amu_scan_for_devices (uint8_t startAddress, uint8_t endAddress) |
| | Scans for any devices that might be connected in order to identify them.
|
| int8_t | amu_get_num_devices () |
| int8_t | amu_get_num_connected_devices () |
| uint8_t | amu_get_device_address (uint8_t deviceNum) |
| | Device addresses are used for TODO.
|
| uint8_t | _amu_route_command (uint8_t deviceNum, CMD_t cmd, size_t transferLen, bool query) |
| | TODO.
|
| void | _amu_transfer_read (size_t offset, void *data, size_t len) |
| | TODO: explain the transfer part of a transfer read.
|
| void | _amu_transfer_write (size_t offset, void *data, size_t len) |
| | TODO: explain the transfer part of a transfer write.
|
| volatile uint8_t * | amu_dev_get_transfer_reg_ptr (void) |
| amu_data_reg_t * | amu_get_register_ptr (uint8_t reg) |
TODO.
- Author
- CJM28241
- Date
- 5/7/2019 3:56:47 PM
Definition in file amu_device.c.
◆ _amu_route_command()
| uint8_t _amu_route_command |
( |
uint8_t | deviceNum, |
|
|
CMD_t | cmd, |
|
|
size_t | transferLen, |
|
|
bool | query ) |
TODO.
TODO
- Parameters
-
| deviceNum | TODO |
| cmd | TODO |
| transferLen | TODO |
| query | TODO |
- Returns
- uint8_t TODO
< Root command for I2C/USB commands
< Root command for I2C/USB commands
Definition at line 242 of file amu_device.c.
◆ _amu_transfer_read()
| void _amu_transfer_read |
( |
size_t | offset, |
|
|
void * | data, |
|
|
size_t | len ) |
TODO: explain the transfer part of a transfer read.
- Parameters
-
| offset | TODO |
| data | TODO |
| len | TODO |
Definition at line 307 of file amu_device.c.
◆ _amu_transfer_write()
| void _amu_transfer_write |
( |
size_t | offset, |
|
|
void * | data, |
|
|
size_t | len ) |
TODO: explain the transfer part of a transfer write.
- Parameters
-
| offset | TODO |
| data | TODO |
| len | TODO |
Definition at line 322 of file amu_device.c.
◆ amu_dev_busy()
| uint8_t amu_dev_busy |
( |
uint8_t | address | ) |
|
Checks to see if the AMU device is busy.
- Parameters
-
- Returns
- uint8_t 1 is busy, 0 otherwise
Definition at line 107 of file amu_device.c.
◆ amu_dev_get_transfer_reg_ptr()
| volatile uint8_t * amu_dev_get_transfer_reg_ptr |
( |
void | | ) |
|
◆ amu_dev_init()
◆ amu_dev_query_command()
| int8_t amu_dev_query_command |
( |
uint8_t | address, |
|
|
CMD_t | command, |
|
|
uint8_t | commandDataLen, |
|
|
uint8_t | responseLength ) |
TODO.
- Parameters
-
| address | TODO |
| command | TODO |
| commandDataLen | TODO |
| responseLength | TODO |
- Returns
- int8_t
Definition at line 152 of file amu_device.c.
◆ amu_dev_send_command()
| int8_t amu_dev_send_command |
( |
uint8_t | address, |
|
|
CMD_t | command ) |
Sends a command to an AMU device.
- Parameters
-
| address | TODO |
| command | Command for the device |
- Returns
- int8_t TODO
Definition at line 125 of file amu_device.c.
◆ amu_dev_send_command_data()
| int8_t amu_dev_send_command_data |
( |
uint8_t | address, |
|
|
CMD_t | command, |
|
|
uint8_t | len ) |
Move local transfer reg to remote transfer reg, then send command.
- Parameters
-
| address | TODO |
| command | Command for the device |
| len | Length of TODO |
- Returns
- int8_t TODO
Definition at line 137 of file amu_device.c.
◆ amu_dev_transfer()
| int8_t amu_dev_transfer |
( |
uint8_t | address, |
|
|
uint8_t | reg, |
|
|
uint8_t * | data, |
|
|
size_t | len, |
|
|
uint8_t | rw ) |
Transfering... TODO.
- Parameters
-
| address | TODO |
| reg | TODO |
| data | TODO |
| len | TODO |
| rw | TODO |
- Returns
- int8_t
Definition at line 97 of file amu_device.c.
◆ amu_get_device_address()
| uint8_t amu_get_device_address |
( |
uint8_t | deviceNum | ) |
|
Device addresses are used for TODO.
- Parameters
-
| deviceNum | Device number of interest |
- Returns
- uint8_t Device address
Definition at line 224 of file amu_device.c.
◆ amu_get_num_connected_devices()
| int8_t amu_get_num_connected_devices |
( |
void | | ) |
|
◆ amu_get_num_devices()
| int8_t amu_get_num_devices |
( |
void | | ) |
|
◆ amu_get_register_ptr()
◆ amu_scan_for_devices()
| uint8_t amu_scan_for_devices |
( |
uint8_t | startAddress, |
|
|
uint8_t | endAddress ) |
Scans for any devices that might be connected in order to identify them.
- Parameters
-
| startAddress | Start address of the scan range |
| endAddress | End address of the scan range |
- Returns
- uint8_t Number of devices found, including this device if AMU_DEVICE is defined
Definition at line 179 of file amu_device.c.
◆ amu_dev_initialized
| uint8_t amu_dev_initialized = 0 |
|
static |
◆ amu_device
Initial value:= {
.sweep_data = NULL,
.amu_regs = NULL,
.transfer = NULL,
.delay = NULL,
.watchdog_kick = NULL,
.hardware_reset = NULL,
.millis = NULL,
.process_cmd = NULL,
}
static volatile uint8_t amu_transfer_reg[(40 *sizeof(float))]
Definition at line 40 of file amu_device.c.
◆ amu_device_addresses
| uint8_t amu_device_addresses[16] |
|
static |
◆ amu_num_devices
| uint8_t amu_num_devices = 0 |
|
static |
◆ amu_transfer_reg
| volatile uint8_t amu_transfer_reg[(40 *sizeof(float))] |
|
static |
◆ transfer_reg_data_len
| uint16_t transfer_reg_data_len = 0 |
|
static |