dRonin
adbada4
dRonin firmware
|
Code to initialize ports/devices for multiple targets. More...
Macros | |
#define | PIOS_COM_TELEM_RF_RX_BUF_LEN 512 |
#define | PIOS_COM_TELEM_RF_TX_BUF_LEN 512 |
#define | PIOS_COM_GPS_RX_BUF_LEN 32 |
#define | PIOS_COM_GPS_TX_BUF_LEN 16 |
#define | PIOS_COM_TELEM_USB_RX_BUF_LEN 129 |
#define | PIOS_COM_TELEM_USB_TX_BUF_LEN 65 |
#define | PIOS_COM_BRIDGE_RX_BUF_LEN 65 |
#define | PIOS_COM_BRIDGE_TX_BUF_LEN 12 |
#define | PIOS_COM_MAVLINK_TX_BUF_LEN 128 |
#define | PIOS_COM_MSP_TX_BUF_LEN 128 |
#define | PIOS_COM_MSP_RX_BUF_LEN 65 |
#define | PIOS_COM_HOTT_RX_BUF_LEN 16 |
#define | PIOS_COM_HOTT_TX_BUF_LEN 16 |
#define | PIOS_COM_FRSKYSENSORHUB_TX_BUF_LEN 128 |
#define | PIOS_COM_LIGHTTELEMETRY_TX_BUF_LEN 22 |
#define | PIOS_COM_FRSKYSPORT_TX_BUF_LEN 16 |
#define | PIOS_COM_FRSKYSPORT_RX_BUF_LEN 16 |
#define | PIOS_COM_OPENLOG_TX_BUF_LEN 768 |
#define | PIOS_COM_STORM32BGC_RX_BUF_LEN 32 |
#define | PIOS_COM_STORM32BGC_TX_BUF_LEN 32 |
#define | PIOS_COM_TBSVTXCONFIG_TX_BUF_LEN 32 |
#define | PIOS_COM_TBSVTXCONFIG_RX_BUF_LEN 32 |
#define | BT_COMMAND_DELAY 1100 |
Configure a [flexi/main/rcvr/etc] port. More... | |
#define | BT_COMMAND_QDELAY 350 |
Functions | |
static void | PIOS_HAL_Err2811 (bool on) |
void | PIOS_HAL_CriticalError (uint32_t led_id, enum pios_hal_panic code) |
Flash a blink code. More... | |
static void | PIOS_HAL_SetTarget (uintptr_t *target, uintptr_t value) |
Bind a device instance to a role. More... | |
void | PIOS_HAL_ConfigureSerialSpeed (uintptr_t com_id, HwSharedSpeedBpsOptions speed) |
int | PIOS_HAL_ConfigureExternalBaro (HwSharedExtBaroOptions baro, pios_i2c_t *i2c_id, const struct pios_i2c_adapter_cfg *i2c_cfg) |
int | PIOS_HAL_ConfigureExternalMag (HwSharedMagOptions mag, HwSharedMagOrientationOptions orientation, pios_i2c_t *i2c_id, const struct pios_i2c_adapter_cfg *i2c_cfg) |
void | PIOS_HAL_InitUAVTalkReceiver () |
Variables | |
uintptr_t | pios_rcvr_group_map [MANUALCONTROLSETTINGS_CHANNELGROUPS_NONE] |
uintptr_t | pios_com_gps_id |
uintptr_t | pios_com_bridge_id |
uintptr_t | pios_com_telem_serial_id |
Code to initialize ports/devices for multiple targets.
#define BT_COMMAND_DELAY 1100 |
Configure a [flexi/main/rcvr/etc] port.
Not all of these parameters will be defined for each port. Caller may pass NULL but is responsible for ensuring illegal modes also do not exist in the target's UAVO definition.
Hopefully more of these can be inferred with time and the arg list can greatly decrease in size.
[in] | port_type | protocol to speak on this port |
[in] | usart_port_cfg | serial configuration for most modes on this port |
[in] | com_driver | communications driver for serial on this port |
[out] | i2c_id | ID of I2C peripheral if operated in I2C mode |
[in] | i2c_Cfg | Adapter configuration/registers for I2C mode |
[in] | ppm_cfg | Configuration/registers for PPM mode |
[in] | pwm_cfg | Configuration/registers for PWM mode |
[in] | led_id | LED to blink when there's panics |
[in] | dsm_cfg | DSM configuration for this port |
[in] | dsm_mode | Mode in which to operate DSM driver; encapsulates binding |
[in] | sbus_cfg | SBUS configuration for this port |
Definition at line 1111 of file pios_hal.c.
#define BT_COMMAND_QDELAY 350 |
Definition at line 1113 of file pios_hal.c.
#define PIOS_COM_BRIDGE_RX_BUF_LEN 65 |
Definition at line 159 of file pios_hal.c.
#define PIOS_COM_BRIDGE_TX_BUF_LEN 12 |
Definition at line 163 of file pios_hal.c.
#define PIOS_COM_FRSKYSENSORHUB_TX_BUF_LEN 128 |
Definition at line 187 of file pios_hal.c.
#define PIOS_COM_FRSKYSPORT_RX_BUF_LEN 16 |
Definition at line 199 of file pios_hal.c.
#define PIOS_COM_FRSKYSPORT_TX_BUF_LEN 16 |
Definition at line 195 of file pios_hal.c.
#define PIOS_COM_GPS_RX_BUF_LEN 32 |
Definition at line 143 of file pios_hal.c.
#define PIOS_COM_GPS_TX_BUF_LEN 16 |
Definition at line 147 of file pios_hal.c.
#define PIOS_COM_HOTT_RX_BUF_LEN 16 |
Definition at line 179 of file pios_hal.c.
#define PIOS_COM_HOTT_TX_BUF_LEN 16 |
Definition at line 183 of file pios_hal.c.
#define PIOS_COM_LIGHTTELEMETRY_TX_BUF_LEN 22 |
Definition at line 191 of file pios_hal.c.
#define PIOS_COM_MAVLINK_TX_BUF_LEN 128 |
Definition at line 167 of file pios_hal.c.
#define PIOS_COM_MSP_RX_BUF_LEN 65 |
Definition at line 175 of file pios_hal.c.
#define PIOS_COM_MSP_TX_BUF_LEN 128 |
Definition at line 171 of file pios_hal.c.
#define PIOS_COM_OPENLOG_TX_BUF_LEN 768 |
Definition at line 203 of file pios_hal.c.
#define PIOS_COM_STORM32BGC_RX_BUF_LEN 32 |
Definition at line 207 of file pios_hal.c.
#define PIOS_COM_STORM32BGC_TX_BUF_LEN 32 |
Definition at line 211 of file pios_hal.c.
#define PIOS_COM_TBSVTXCONFIG_RX_BUF_LEN 32 |
Definition at line 219 of file pios_hal.c.
#define PIOS_COM_TBSVTXCONFIG_TX_BUF_LEN 32 |
Definition at line 215 of file pios_hal.c.
#define PIOS_COM_TELEM_RF_RX_BUF_LEN 512 |
Definition at line 135 of file pios_hal.c.
#define PIOS_COM_TELEM_RF_TX_BUF_LEN 512 |
Definition at line 139 of file pios_hal.c.
#define PIOS_COM_TELEM_USB_RX_BUF_LEN 129 |
Definition at line 151 of file pios_hal.c.
#define PIOS_COM_TELEM_USB_TX_BUF_LEN 65 |
Definition at line 155 of file pios_hal.c.
int PIOS_HAL_ConfigureExternalBaro | ( | HwSharedExtBaroOptions | baro, |
pios_i2c_t * | i2c_id, | ||
const struct pios_i2c_adapter_cfg * | i2c_cfg | ||
) |
Definition at line 1242 of file pios_hal.c.
int PIOS_HAL_ConfigureExternalMag | ( | HwSharedMagOptions | mag, |
HwSharedMagOrientationOptions | orientation, | ||
pios_i2c_t * | i2c_id, | ||
const struct pios_i2c_adapter_cfg * | i2c_cfg | ||
) |
Definition at line 1298 of file pios_hal.c.
void PIOS_HAL_ConfigureSerialSpeed | ( | uintptr_t | com_id, |
HwSharedSpeedBpsOptions | speed | ||
) |
Definition at line 1115 of file pios_hal.c.
void PIOS_HAL_CriticalError | ( | uint32_t | led_id, |
enum pios_hal_panic | code | ||
) |
Flash a blink code.
[in] | led_id | The LED to blink |
[in] | code | Number of blinks to do in a row |
Definition at line 291 of file pios_hal.c.
|
inlinestatic |
Definition at line 271 of file pios_hal.c.
void PIOS_HAL_InitUAVTalkReceiver | ( | ) |
Definition at line 1435 of file pios_hal.c.
|
static |
Bind a device instance to a role.
This allows us to check for duplicates and to eventually do something intelligent baout them here.
[out] | target | place dedicated for this role to store device id |
[in] | value | handle of the device to store into this role. |
Definition at line 336 of file pios_hal.c.
uintptr_t pios_com_bridge_id |
Definition at line 81 of file pios_hal.c.
uintptr_t pios_com_gps_id |
Definition at line 80 of file pios_hal.c.
uintptr_t pios_com_telem_serial_id |
Definition at line 127 of file pios_hal.c.
uintptr_t pios_rcvr_group_map[MANUALCONTROLSETTINGS_CHANNELGROUPS_NONE] |
Definition at line 73 of file pios_hal.c.