mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2024-11-29 07:24:13 +01:00
DSM Protocol removed flight firmware
This commit is contained in:
parent
1942d2ee30
commit
cd94410468
@ -120,7 +120,6 @@ extern int32_t PIOS_DSM_Init(uint32_t *dsm_id,
|
||||
const struct pios_dsm_cfg *cfg,
|
||||
const struct pios_com_driver *driver,
|
||||
uint32_t lower_id,
|
||||
enum pios_dsm_proto proto,
|
||||
uint8_t bind);
|
||||
|
||||
#endif /* PIOS_DSM_PRIV_H */
|
||||
|
@ -69,7 +69,6 @@ struct pios_dsm_state {
|
||||
struct pios_dsm_dev {
|
||||
enum pios_dsm_dev_magic magic;
|
||||
const struct pios_dsm_cfg *cfg;
|
||||
enum pios_dsm_proto proto;
|
||||
struct pios_dsm_state state;
|
||||
};
|
||||
|
||||
@ -269,7 +268,6 @@ int32_t PIOS_DSM_Init(uint32_t *dsm_id,
|
||||
const struct pios_dsm_cfg *cfg,
|
||||
const struct pios_com_driver *driver,
|
||||
uint32_t lower_id,
|
||||
enum pios_dsm_proto proto,
|
||||
uint8_t bind)
|
||||
{
|
||||
PIOS_DEBUG_Assert(dsm_id);
|
||||
@ -285,7 +283,6 @@ int32_t PIOS_DSM_Init(uint32_t *dsm_id,
|
||||
|
||||
/* Bind the configuration to the device instance */
|
||||
dsm_dev->cfg = cfg;
|
||||
dsm_dev->proto = proto;
|
||||
|
||||
/* Bind the receiver if requested */
|
||||
if (bind) {
|
||||
|
@ -72,7 +72,6 @@ struct pios_dsm_state {
|
||||
struct pios_dsm_dev {
|
||||
enum pios_dsm_dev_magic magic;
|
||||
const struct pios_dsm_cfg *cfg;
|
||||
enum pios_dsm_proto proto;
|
||||
struct pios_dsm_state state;
|
||||
};
|
||||
|
||||
@ -269,7 +268,6 @@ int32_t PIOS_DSM_Init(uint32_t *dsm_id,
|
||||
const struct pios_dsm_cfg *cfg,
|
||||
const struct pios_com_driver *driver,
|
||||
uint32_t lower_id,
|
||||
enum pios_dsm_proto proto,
|
||||
uint8_t bind)
|
||||
{
|
||||
PIOS_DEBUG_Assert(dsm_id);
|
||||
@ -285,7 +283,6 @@ int32_t PIOS_DSM_Init(uint32_t *dsm_id,
|
||||
|
||||
/* Bind the configuration to the device instance */
|
||||
dsm_dev->cfg = cfg;
|
||||
dsm_dev->proto = proto;
|
||||
|
||||
/* Bind the receiver if requested */
|
||||
if (bind) {
|
||||
|
@ -480,27 +480,9 @@ void PIOS_Board_Init(void)
|
||||
}
|
||||
#endif /* PIOS_INCLUDE_GPS */
|
||||
break;
|
||||
case HWSETTINGS_CC_MAINPORT_DSM2:
|
||||
case HWSETTINGS_CC_MAINPORT_DSMX10BIT:
|
||||
case HWSETTINGS_CC_MAINPORT_DSMX11BIT:
|
||||
case HWSETTINGS_CC_MAINPORT_DSM:
|
||||
#if defined(PIOS_INCLUDE_DSM)
|
||||
{
|
||||
enum pios_dsm_proto proto;
|
||||
switch (hwsettings_cc_mainport) {
|
||||
case HWSETTINGS_CC_MAINPORT_DSM2:
|
||||
proto = PIOS_DSM_PROTO_DSM2;
|
||||
break;
|
||||
case HWSETTINGS_CC_MAINPORT_DSMX10BIT:
|
||||
proto = PIOS_DSM_PROTO_DSMX10BIT;
|
||||
break;
|
||||
case HWSETTINGS_CC_MAINPORT_DSMX11BIT:
|
||||
proto = PIOS_DSM_PROTO_DSMX11BIT;
|
||||
break;
|
||||
default:
|
||||
PIOS_Assert(0);
|
||||
break;
|
||||
}
|
||||
|
||||
uint32_t pios_usart_dsm_id;
|
||||
if (PIOS_USART_Init(&pios_usart_dsm_id, &pios_usart_dsm_main_cfg)) {
|
||||
PIOS_Assert(0);
|
||||
@ -511,7 +493,7 @@ void PIOS_Board_Init(void)
|
||||
&pios_dsm_main_cfg,
|
||||
&pios_usart_com_driver,
|
||||
pios_usart_dsm_id,
|
||||
proto, 0)) {
|
||||
0)) {
|
||||
PIOS_Assert(0);
|
||||
}
|
||||
|
||||
@ -654,27 +636,9 @@ void PIOS_Board_Init(void)
|
||||
}
|
||||
#endif /* PIOS_INCLUDE_PPM_FLEXI */
|
||||
break;
|
||||
case HWSETTINGS_CC_FLEXIPORT_DSM2:
|
||||
case HWSETTINGS_CC_FLEXIPORT_DSMX10BIT:
|
||||
case HWSETTINGS_CC_FLEXIPORT_DSMX11BIT:
|
||||
case HWSETTINGS_CC_FLEXIPORT_DSM:
|
||||
#if defined(PIOS_INCLUDE_DSM)
|
||||
{
|
||||
enum pios_dsm_proto proto;
|
||||
switch (hwsettings_cc_flexiport) {
|
||||
case HWSETTINGS_CC_FLEXIPORT_DSM2:
|
||||
proto = PIOS_DSM_PROTO_DSM2;
|
||||
break;
|
||||
case HWSETTINGS_CC_FLEXIPORT_DSMX10BIT:
|
||||
proto = PIOS_DSM_PROTO_DSMX10BIT;
|
||||
break;
|
||||
case HWSETTINGS_CC_FLEXIPORT_DSMX11BIT:
|
||||
proto = PIOS_DSM_PROTO_DSMX11BIT;
|
||||
break;
|
||||
default:
|
||||
PIOS_Assert(0);
|
||||
break;
|
||||
}
|
||||
|
||||
uint32_t pios_usart_dsm_id;
|
||||
if (PIOS_USART_Init(&pios_usart_dsm_id, &pios_usart_dsm_flexi_cfg)) {
|
||||
PIOS_Assert(0);
|
||||
@ -685,7 +649,7 @@ void PIOS_Board_Init(void)
|
||||
&pios_dsm_flexi_cfg,
|
||||
&pios_usart_com_driver,
|
||||
pios_usart_dsm_id,
|
||||
proto, hwsettings_DSMxBind)) {
|
||||
hwsettings_DSMxBind)) {
|
||||
PIOS_Assert(0);
|
||||
}
|
||||
|
||||
|
@ -276,7 +276,7 @@ static void PIOS_Board_configure_com(const struct pios_usart_cfg *usart_port_cfg
|
||||
}
|
||||
|
||||
static void PIOS_Board_configure_dsm(const struct pios_usart_cfg *pios_usart_dsm_cfg, const struct pios_dsm_cfg *pios_dsm_cfg,
|
||||
const struct pios_com_driver *usart_com_driver, enum pios_dsm_proto *proto,
|
||||
const struct pios_com_driver *usart_com_driver,
|
||||
ManualControlSettingsChannelGroupsOptions channelgroup, uint8_t *bind)
|
||||
{
|
||||
uint32_t pios_usart_dsm_id;
|
||||
@ -287,7 +287,7 @@ static void PIOS_Board_configure_dsm(const struct pios_usart_cfg *pios_usart_dsm
|
||||
|
||||
uint32_t pios_dsm_id;
|
||||
if (PIOS_DSM_Init(&pios_dsm_id, pios_dsm_cfg, usart_com_driver,
|
||||
pios_usart_dsm_id, *proto, *bind)) {
|
||||
pios_usart_dsm_id, *bind)) {
|
||||
PIOS_Assert(0);
|
||||
}
|
||||
|
||||
@ -614,34 +614,14 @@ void PIOS_Board_Init(void)
|
||||
}
|
||||
#endif
|
||||
break;
|
||||
case HWSETTINGS_RM_MAINPORT_DSM2:
|
||||
case HWSETTINGS_RM_MAINPORT_DSMX10BIT:
|
||||
case HWSETTINGS_RM_MAINPORT_DSMX11BIT:
|
||||
{
|
||||
enum pios_dsm_proto proto;
|
||||
switch (hwsettings_mainport) {
|
||||
case HWSETTINGS_RM_MAINPORT_DSM2:
|
||||
proto = PIOS_DSM_PROTO_DSM2;
|
||||
break;
|
||||
case HWSETTINGS_RM_MAINPORT_DSMX10BIT:
|
||||
proto = PIOS_DSM_PROTO_DSMX10BIT;
|
||||
break;
|
||||
case HWSETTINGS_RM_MAINPORT_DSMX11BIT:
|
||||
proto = PIOS_DSM_PROTO_DSMX11BIT;
|
||||
break;
|
||||
default:
|
||||
PIOS_Assert(0);
|
||||
break;
|
||||
}
|
||||
|
||||
case HWSETTINGS_RM_MAINPORT_DSM:
|
||||
// Force binding to zero on the main port
|
||||
hwsettings_DSMxBind = 0;
|
||||
|
||||
// TODO: Define the various Channelgroup for Revo dsm inputs and handle here
|
||||
PIOS_Board_configure_dsm(&pios_usart_dsm_main_cfg, &pios_dsm_main_cfg,
|
||||
&pios_usart_com_driver, &proto, MANUALCONTROLSETTINGS_CHANNELGROUPS_DSMMAINPORT, &hwsettings_DSMxBind);
|
||||
}
|
||||
break;
|
||||
&pios_usart_com_driver, MANUALCONTROLSETTINGS_CHANNELGROUPS_DSMMAINPORT, &hwsettings_DSMxBind);
|
||||
break;
|
||||
case HWSETTINGS_RM_MAINPORT_DEBUGCONSOLE:
|
||||
#if defined(PIOS_INCLUDE_DEBUG_CONSOLE)
|
||||
{
|
||||
@ -683,30 +663,11 @@ void PIOS_Board_Init(void)
|
||||
case HWSETTINGS_RM_FLEXIPORT_GPS:
|
||||
PIOS_Board_configure_com(&pios_usart_flexi_cfg, PIOS_COM_GPS_RX_BUF_LEN, -1, &pios_usart_com_driver, &pios_com_gps_id);
|
||||
break;
|
||||
case HWSETTINGS_RM_FLEXIPORT_DSM2:
|
||||
case HWSETTINGS_RM_FLEXIPORT_DSMX10BIT:
|
||||
case HWSETTINGS_RM_FLEXIPORT_DSMX11BIT:
|
||||
{
|
||||
enum pios_dsm_proto proto;
|
||||
switch (hwsettings_flexiport) {
|
||||
case HWSETTINGS_RM_FLEXIPORT_DSM2:
|
||||
proto = PIOS_DSM_PROTO_DSM2;
|
||||
break;
|
||||
case HWSETTINGS_RM_FLEXIPORT_DSMX10BIT:
|
||||
proto = PIOS_DSM_PROTO_DSMX10BIT;
|
||||
break;
|
||||
case HWSETTINGS_RM_FLEXIPORT_DSMX11BIT:
|
||||
proto = PIOS_DSM_PROTO_DSMX11BIT;
|
||||
break;
|
||||
default:
|
||||
PIOS_Assert(0);
|
||||
break;
|
||||
}
|
||||
case HWSETTINGS_RM_FLEXIPORT_DSM:
|
||||
// TODO: Define the various Channelgroup for Revo dsm inputs and handle here
|
||||
PIOS_Board_configure_dsm(&pios_usart_dsm_flexi_cfg, &pios_dsm_flexi_cfg,
|
||||
&pios_usart_com_driver, &proto, MANUALCONTROLSETTINGS_CHANNELGROUPS_DSMFLEXIPORT, &hwsettings_DSMxBind);
|
||||
}
|
||||
break;
|
||||
&pios_usart_com_driver, MANUALCONTROLSETTINGS_CHANNELGROUPS_DSMFLEXIPORT, &hwsettings_DSMxBind);
|
||||
break;
|
||||
case HWSETTINGS_RM_FLEXIPORT_DEBUGCONSOLE:
|
||||
#if defined(PIOS_INCLUDE_DEBUG_CONSOLE)
|
||||
{
|
||||
|
@ -418,29 +418,10 @@ void PIOS_Board_Init(void)
|
||||
#endif /* PIOS_INCLUDE_I2C */
|
||||
/* break;
|
||||
|
||||
case HWSETTINGS_RV_FLEXIPORT_DSM2:
|
||||
case HWSETTINGS_RV_FLEXIPORT_DSMX10BIT:
|
||||
case HWSETTINGS_RV_FLEXIPORT_DSMX11BIT:
|
||||
{
|
||||
enum pios_dsm_proto proto;
|
||||
switch (hwsettings_rv_flexiport) {
|
||||
case HWSETTINGS_RV_FLEXIPORT_DSM2:
|
||||
proto = PIOS_DSM_PROTO_DSM2;
|
||||
break;
|
||||
case HWSETTINGS_RV_FLEXIPORT_DSMX10BIT:
|
||||
proto = PIOS_DSM_PROTO_DSMX10BIT;
|
||||
break;
|
||||
case HWSETTINGS_RV_FLEXIPORT_DSMX11BIT:
|
||||
proto = PIOS_DSM_PROTO_DSMX11BIT;
|
||||
break;
|
||||
default:
|
||||
PIOS_Assert(0);
|
||||
break;
|
||||
}
|
||||
case HWSETTINGS_RV_FLEXIPORT_DSM:
|
||||
//TODO: Define the various Channelgroup for Revo dsm inputs and handle here
|
||||
PIOS_Board_configure_dsm(&pios_usart_dsm_flexi_cfg, &pios_dsm_flexi_cfg,
|
||||
&pios_usart_com_driver, &proto, MANUALCONTROLSETTINGS_CHANNELGROUPS_DSMMAINPORT,&hwsettings_DSMxBind);
|
||||
}
|
||||
&pios_usart_com_driver, MANUALCONTROLSETTINGS_CHANNELGROUPS_DSMMAINPORT,&hwsettings_DSMxBind);
|
||||
break;
|
||||
case HWSETTINGS_RV_FLEXIPORT_COMAUX:
|
||||
PIOS_Board_configure_com(&pios_usart_flexi_cfg, PIOS_COM_AUX_RX_BUF_LEN, PIOS_COM_AUX_TX_BUF_LEN, &pios_usart_com_driver, &pios_com_aux_id);
|
||||
|
@ -289,7 +289,7 @@ static void PIOS_Board_configure_com(const struct pios_usart_cfg *usart_port_cfg
|
||||
}
|
||||
|
||||
static void PIOS_Board_configure_dsm(const struct pios_usart_cfg *pios_usart_dsm_cfg, const struct pios_dsm_cfg *pios_dsm_cfg,
|
||||
const struct pios_com_driver *usart_com_driver, enum pios_dsm_proto *proto,
|
||||
const struct pios_com_driver *usart_com_driver,
|
||||
ManualControlSettingsChannelGroupsOptions channelgroup, uint8_t *bind)
|
||||
{
|
||||
uint32_t pios_usart_dsm_id;
|
||||
@ -300,7 +300,7 @@ static void PIOS_Board_configure_dsm(const struct pios_usart_cfg *pios_usart_dsm
|
||||
|
||||
uint32_t pios_dsm_id;
|
||||
if (PIOS_DSM_Init(&pios_dsm_id, pios_dsm_cfg, usart_com_driver,
|
||||
pios_usart_dsm_id, *proto, *bind)) {
|
||||
pios_usart_dsm_id, *bind)) {
|
||||
PIOS_Assert(0);
|
||||
}
|
||||
|
||||
@ -636,33 +636,13 @@ void PIOS_Board_Init(void)
|
||||
}
|
||||
#endif
|
||||
break;
|
||||
case HWSETTINGS_RM_MAINPORT_DSM2:
|
||||
case HWSETTINGS_RM_MAINPORT_DSMX10BIT:
|
||||
case HWSETTINGS_RM_MAINPORT_DSMX11BIT:
|
||||
{
|
||||
enum pios_dsm_proto proto;
|
||||
switch (hwsettings_mainport) {
|
||||
case HWSETTINGS_RM_MAINPORT_DSM2:
|
||||
proto = PIOS_DSM_PROTO_DSM2;
|
||||
break;
|
||||
case HWSETTINGS_RM_MAINPORT_DSMX10BIT:
|
||||
proto = PIOS_DSM_PROTO_DSMX10BIT;
|
||||
break;
|
||||
case HWSETTINGS_RM_MAINPORT_DSMX11BIT:
|
||||
proto = PIOS_DSM_PROTO_DSMX11BIT;
|
||||
break;
|
||||
default:
|
||||
PIOS_Assert(0);
|
||||
break;
|
||||
}
|
||||
|
||||
case HWSETTINGS_RM_MAINPORT_DSM:
|
||||
// Force binding to zero on the main port
|
||||
hwsettings_DSMxBind = 0;
|
||||
|
||||
// TODO: Define the various Channelgroup for Revo dsm inputs and handle here
|
||||
PIOS_Board_configure_dsm(&pios_usart_dsm_main_cfg, &pios_dsm_main_cfg,
|
||||
&pios_usart_com_driver, &proto, MANUALCONTROLSETTINGS_CHANNELGROUPS_DSMMAINPORT, &hwsettings_DSMxBind);
|
||||
}
|
||||
&pios_usart_com_driver, MANUALCONTROLSETTINGS_CHANNELGROUPS_DSMMAINPORT, &hwsettings_DSMxBind);
|
||||
break;
|
||||
case HWSETTINGS_RM_MAINPORT_DEBUGCONSOLE:
|
||||
#if defined(PIOS_INCLUDE_DEBUG_CONSOLE)
|
||||
@ -705,30 +685,11 @@ void PIOS_Board_Init(void)
|
||||
case HWSETTINGS_RM_FLEXIPORT_GPS:
|
||||
PIOS_Board_configure_com(&pios_usart_flexi_cfg, PIOS_COM_GPS_RX_BUF_LEN, PIOS_COM_GPS_TX_BUF_LEN, &pios_usart_com_driver, &pios_com_gps_id);
|
||||
break;
|
||||
case HWSETTINGS_RM_FLEXIPORT_DSM2:
|
||||
case HWSETTINGS_RM_FLEXIPORT_DSMX10BIT:
|
||||
case HWSETTINGS_RM_FLEXIPORT_DSMX11BIT:
|
||||
{
|
||||
enum pios_dsm_proto proto;
|
||||
switch (hwsettings_flexiport) {
|
||||
case HWSETTINGS_RM_FLEXIPORT_DSM2:
|
||||
proto = PIOS_DSM_PROTO_DSM2;
|
||||
break;
|
||||
case HWSETTINGS_RM_FLEXIPORT_DSMX10BIT:
|
||||
proto = PIOS_DSM_PROTO_DSMX10BIT;
|
||||
break;
|
||||
case HWSETTINGS_RM_FLEXIPORT_DSMX11BIT:
|
||||
proto = PIOS_DSM_PROTO_DSMX11BIT;
|
||||
break;
|
||||
default:
|
||||
PIOS_Assert(0);
|
||||
break;
|
||||
}
|
||||
case HWSETTINGS_RM_FLEXIPORT_DSM:
|
||||
// TODO: Define the various Channelgroup for Revo dsm inputs and handle here
|
||||
PIOS_Board_configure_dsm(&pios_usart_dsm_flexi_cfg, &pios_dsm_flexi_cfg,
|
||||
&pios_usart_com_driver, &proto, MANUALCONTROLSETTINGS_CHANNELGROUPS_DSMFLEXIPORT, &hwsettings_DSMxBind);
|
||||
}
|
||||
break;
|
||||
&pios_usart_com_driver, MANUALCONTROLSETTINGS_CHANNELGROUPS_DSMFLEXIPORT, &hwsettings_DSMxBind);
|
||||
break;
|
||||
case HWSETTINGS_RM_FLEXIPORT_DEBUGCONSOLE:
|
||||
#if defined(PIOS_INCLUDE_DEBUG_CONSOLE)
|
||||
{
|
||||
|
@ -352,7 +352,7 @@ static void PIOS_Board_configure_com(const struct pios_usart_cfg *usart_port_cfg
|
||||
}
|
||||
|
||||
static void PIOS_Board_configure_dsm(const struct pios_usart_cfg *pios_usart_dsm_cfg, const struct pios_dsm_cfg *pios_dsm_cfg,
|
||||
const struct pios_com_driver *usart_com_driver, enum pios_dsm_proto *proto,
|
||||
const struct pios_com_driver *usart_com_driver,
|
||||
ManualControlSettingsChannelGroupsOptions channelgroup, uint8_t *bind)
|
||||
{
|
||||
uint32_t pios_usart_dsm_id;
|
||||
@ -363,7 +363,7 @@ static void PIOS_Board_configure_dsm(const struct pios_usart_cfg *pios_usart_dsm
|
||||
|
||||
uint32_t pios_dsm_id;
|
||||
if (PIOS_DSM_Init(&pios_dsm_id, pios_dsm_cfg, usart_com_driver,
|
||||
pios_usart_dsm_id, *proto, *bind)) {
|
||||
pios_usart_dsm_id, *bind)) {
|
||||
PIOS_Assert(0);
|
||||
}
|
||||
|
||||
@ -680,30 +680,11 @@ void PIOS_Board_Init(void)
|
||||
PIOS_Board_configure_com(&pios_usart_aux_cfg, PIOS_COM_TELEM_RF_RX_BUF_LEN, PIOS_COM_TELEM_RF_TX_BUF_LEN, &pios_usart_com_driver, &pios_com_telem_rf_id);
|
||||
break;
|
||||
|
||||
case HWSETTINGS_RV_AUXPORT_DSM2:
|
||||
case HWSETTINGS_RV_AUXPORT_DSMX10BIT:
|
||||
case HWSETTINGS_RV_AUXPORT_DSMX11BIT:
|
||||
{
|
||||
enum pios_dsm_proto proto;
|
||||
switch (hwsettings_rv_auxport) {
|
||||
case HWSETTINGS_RV_AUXPORT_DSM2:
|
||||
proto = PIOS_DSM_PROTO_DSM2;
|
||||
break;
|
||||
case HWSETTINGS_RV_AUXPORT_DSMX10BIT:
|
||||
proto = PIOS_DSM_PROTO_DSMX10BIT;
|
||||
break;
|
||||
case HWSETTINGS_RV_AUXPORT_DSMX11BIT:
|
||||
proto = PIOS_DSM_PROTO_DSMX11BIT;
|
||||
break;
|
||||
default:
|
||||
PIOS_Assert(0);
|
||||
break;
|
||||
}
|
||||
case HWSETTINGS_RV_AUXPORT_DSM:
|
||||
// TODO: Define the various Channelgroup for Revo dsm inputs and handle here
|
||||
PIOS_Board_configure_dsm(&pios_usart_dsm_aux_cfg, &pios_dsm_aux_cfg,
|
||||
&pios_usart_com_driver, &proto, MANUALCONTROLSETTINGS_CHANNELGROUPS_DSMMAINPORT, &hwsettings_DSMxBind);
|
||||
}
|
||||
break;
|
||||
&pios_usart_com_driver, MANUALCONTROLSETTINGS_CHANNELGROUPS_DSMMAINPORT, &hwsettings_DSMxBind);
|
||||
break;
|
||||
case HWSETTINGS_RV_AUXPORT_COMAUX:
|
||||
PIOS_Board_configure_com(&pios_usart_aux_cfg, PIOS_COM_AUX_RX_BUF_LEN, PIOS_COM_AUX_TX_BUF_LEN, &pios_usart_com_driver, &pios_com_aux_id);
|
||||
break;
|
||||
@ -744,30 +725,11 @@ void PIOS_Board_Init(void)
|
||||
#endif /* PIOS_INCLUDE_SBUS */
|
||||
break;
|
||||
|
||||
case HWSETTINGS_RV_AUXSBUSPORT_DSM2:
|
||||
case HWSETTINGS_RV_AUXSBUSPORT_DSMX10BIT:
|
||||
case HWSETTINGS_RV_AUXSBUSPORT_DSMX11BIT:
|
||||
{
|
||||
enum pios_dsm_proto proto;
|
||||
switch (hwsettings_rv_auxsbusport) {
|
||||
case HWSETTINGS_RV_AUXSBUSPORT_DSM2:
|
||||
proto = PIOS_DSM_PROTO_DSM2;
|
||||
break;
|
||||
case HWSETTINGS_RV_AUXSBUSPORT_DSMX10BIT:
|
||||
proto = PIOS_DSM_PROTO_DSMX10BIT;
|
||||
break;
|
||||
case HWSETTINGS_RV_AUXSBUSPORT_DSMX11BIT:
|
||||
proto = PIOS_DSM_PROTO_DSMX11BIT;
|
||||
break;
|
||||
default:
|
||||
PIOS_Assert(0);
|
||||
break;
|
||||
}
|
||||
case HWSETTINGS_RV_AUXSBUSPORT_DSM:
|
||||
// TODO: Define the various Channelgroup for Revo dsm inputs and handle here
|
||||
PIOS_Board_configure_dsm(&pios_usart_dsm_auxsbus_cfg, &pios_dsm_auxsbus_cfg,
|
||||
&pios_usart_com_driver, &proto, MANUALCONTROLSETTINGS_CHANNELGROUPS_DSMMAINPORT, &hwsettings_DSMxBind);
|
||||
}
|
||||
break;
|
||||
&pios_usart_com_driver, MANUALCONTROLSETTINGS_CHANNELGROUPS_DSMMAINPORT, &hwsettings_DSMxBind);
|
||||
break;
|
||||
case HWSETTINGS_RV_AUXSBUSPORT_COMAUX:
|
||||
PIOS_Board_configure_com(&pios_usart_auxsbus_cfg, PIOS_COM_AUX_RX_BUF_LEN, PIOS_COM_AUX_TX_BUF_LEN, &pios_usart_com_driver, &pios_com_aux_id);
|
||||
break;
|
||||
@ -797,30 +759,11 @@ void PIOS_Board_Init(void)
|
||||
#endif /* PIOS_INCLUDE_I2C */
|
||||
break;
|
||||
|
||||
case HWSETTINGS_RV_FLEXIPORT_DSM2:
|
||||
case HWSETTINGS_RV_FLEXIPORT_DSMX10BIT:
|
||||
case HWSETTINGS_RV_FLEXIPORT_DSMX11BIT:
|
||||
{
|
||||
enum pios_dsm_proto proto;
|
||||
switch (hwsettings_rv_flexiport) {
|
||||
case HWSETTINGS_RV_FLEXIPORT_DSM2:
|
||||
proto = PIOS_DSM_PROTO_DSM2;
|
||||
break;
|
||||
case HWSETTINGS_RV_FLEXIPORT_DSMX10BIT:
|
||||
proto = PIOS_DSM_PROTO_DSMX10BIT;
|
||||
break;
|
||||
case HWSETTINGS_RV_FLEXIPORT_DSMX11BIT:
|
||||
proto = PIOS_DSM_PROTO_DSMX11BIT;
|
||||
break;
|
||||
default:
|
||||
PIOS_Assert(0);
|
||||
break;
|
||||
}
|
||||
case HWSETTINGS_RV_FLEXIPORT_DSM:
|
||||
// TODO: Define the various Channelgroup for Revo dsm inputs and handle here
|
||||
PIOS_Board_configure_dsm(&pios_usart_dsm_flexi_cfg, &pios_dsm_flexi_cfg,
|
||||
&pios_usart_com_driver, &proto, MANUALCONTROLSETTINGS_CHANNELGROUPS_DSMMAINPORT, &hwsettings_DSMxBind);
|
||||
}
|
||||
break;
|
||||
&pios_usart_com_driver, MANUALCONTROLSETTINGS_CHANNELGROUPS_DSMMAINPORT, &hwsettings_DSMxBind);
|
||||
break;
|
||||
case HWSETTINGS_RV_FLEXIPORT_COMAUX:
|
||||
PIOS_Board_configure_com(&pios_usart_flexi_cfg, PIOS_COM_AUX_RX_BUF_LEN, PIOS_COM_AUX_TX_BUF_LEN, &pios_usart_com_driver, &pios_com_aux_id);
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user