Paparazzi UAS
v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
|
Driver to communicate with the ardupilot IO MCU. More...
Go to the source code of this file.
Data Structures | |
struct | IOPacket |
struct | page_config |
struct | page_reg_status |
struct | page_rc_input |
struct | page_mixing |
struct | page_GPIO |
Enumerations | |
enum | iocode { CODE_READ = 0 , CODE_WRITE = 1 , CODE_SUCCESS = 0 , CODE_CORRUPT = 1 , CODE_ERROR = 2 } |
enum | iopage { PAGE_CONFIG = 0 , PAGE_STATUS = 1 , PAGE_ACTUATORS = 2 , PAGE_SERVOS = 3 , PAGE_RAW_RCIN = 4 , PAGE_RCIN = 5 , PAGE_RAW_ADC = 6 , PAGE_PWM_INFO = 7 , PAGE_SETUP = 50 , PAGE_DIRECT_PWM = 54 , PAGE_FAILSAFE_PWM = 55 , PAGE_MIXING = 200 , PAGE_GPIO = 201 } |
Functions | |
static uint8_t | crc_crc8 (const uint8_t *p, uint8_t len) |
static void | iomcu_write_registers (uint8_t page, uint8_t offset, uint8_t count, const uint16_t *regs) |
Write registers to the IO MCU. More... | |
static void | iomcu_write_register (uint8_t page, uint8_t offset, uint16_t v) |
Write a single register to the IO MCU. More... | |
void | iomcu_set_heater_duty_cycle (uint8_t duty_cycle) |
Set the IO MCU heater duty cycle. More... | |
Variables | |
static const uint8_t | crc8_table [] |
Driver to communicate with the ardupilot IO MCU.
Definition in file iomcu.c.
struct IOPacket |
struct page_config |
struct page_reg_status |
struct page_rc_input |
struct page_mixing |
Data Fields | ||
---|---|---|
uint8_t | enabled | |
uint16_t | manual_rc_mask | |
uint16_t | mixing_gain | |
uint8_t | pad | |
int8_t | rc_chan_override | |
uint8_t | rc_channel[4] | |
uint16_t | rc_max[4] | |
uint16_t | rc_min[4] | |
uint8_t | rc_reversed[IOMCU_MAX_CHANNELS] | |
uint16_t | rc_trim[4] | |
uint8_t | servo_function[IOMCU_MAX_CHANNELS] | |
uint16_t | servo_max[IOMCU_MAX_CHANNELS] | |
uint16_t | servo_min[IOMCU_MAX_CHANNELS] | |
uint8_t | servo_reversed[IOMCU_MAX_CHANNELS] | |
uint16_t | servo_trim[IOMCU_MAX_CHANNELS] | |
uint8_t | throttle_is_angle |
struct page_GPIO |
#define PAGE_REG_SETUP_IGNORE_SAFETY 20 /* bitmask of surfaces to ignore the safety status */ |
enum iocode |
enum iopage |
Definition at line 212 of file iomcu.c.
References logger_uart_parse::crc, crc8_table, and p.
Referenced by iomcu_write_registers().
void iomcu_set_heater_duty_cycle | ( | uint8_t | duty_cycle | ) |
Set the IO MCU heater duty cycle.
External functions.
duty_cycle | The duty cycle to set the heater to [0-100%] |
Definition at line 274 of file iomcu.c.
References iomcu_write_register(), PAGE_REG_SETUP_HEATER_DUTY_CYCLE, and PAGE_SETUP.
Referenced by imu_heater_periodic_10hz().
Write a single register to the IO MCU.
page | The page of the register |
offset | The offset on the page |
v | The value to write to the single register |
Definition at line 264 of file iomcu.c.
References iomcu_write_registers(), offset, and IOPacket::page.
Referenced by iomcu_set_heater_duty_cycle().
|
static |
Write registers to the IO MCU.
page | The page of the register |
offset | The offset on the page |
count | The amount of registers to write |
regs | The register data |
Definition at line 232 of file iomcu.c.
References IOPacket::code, CODE_WRITE, IOPacket::count, IOPacket::crc, crc_crc8(), offset, IOPacket::offset, IOPacket::page, PKT_MAX_REGS, and IOPacket::regs.
Referenced by iomcu_write_register().
|
static |
Definition at line 184 of file iomcu.c.
Referenced by crc_crc8().