mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2024-11-30 08:24:11 +01:00
Convert inline functions to static, let the compiler figure it out. Also some
formatting since code was probably written with tabstop = 2 :)
This commit is contained in:
parent
bbbca319d8
commit
c8d1534b87
@ -269,7 +269,9 @@ uint32_t pios_com_bridge_id = 0;
|
||||
/*
|
||||
* Setup a com port based on the passed cfg, driver and buffer sizes. tx size of -1 make the port rx only
|
||||
*/
|
||||
inline void PIOS_Board_configure_com(const struct pios_usart_cfg *usart_port_cfg, size_t rx_buf_len, size_t tx_buf_len, const struct pios_com_driver *com_driver, uint32_t *pios_com_id) {
|
||||
static void PIOS_Board_configure_com(const struct pios_usart_cfg *usart_port_cfg, size_t rx_buf_len, size_t tx_buf_len,
|
||||
const struct pios_com_driver *com_driver, uint32_t *pios_com_id)
|
||||
{
|
||||
uint32_t pios_usart_id;
|
||||
if (PIOS_USART_Init(&pios_usart_id, usart_port_cfg)) {
|
||||
PIOS_Assert(0);
|
||||
@ -296,19 +298,18 @@ inline void PIOS_Board_configure_com(const struct pios_usart_cfg *usart_port_cfg
|
||||
}
|
||||
}
|
||||
|
||||
inline 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 *pios_usart_com_driver,enum pios_dsm_proto *proto, ManualControlSettingsChannelGroupsOptions channelgroup,uint8_t *bind){
|
||||
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 *pios_usart_com_driver,enum pios_dsm_proto *proto,
|
||||
ManualControlSettingsChannelGroupsOptions channelgroup,uint8_t *bind)
|
||||
{
|
||||
uint32_t pios_usart_dsm_id;
|
||||
if (PIOS_USART_Init(&pios_usart_dsm_id, pios_usart_dsm_cfg)) {
|
||||
PIOS_Assert(0);
|
||||
}
|
||||
|
||||
uint32_t pios_dsm_id;
|
||||
if (PIOS_DSM_Init(&pios_dsm_id,
|
||||
pios_dsm_cfg,
|
||||
pios_usart_com_driver,
|
||||
pios_usart_dsm_id,
|
||||
*proto, *bind)) {
|
||||
if (PIOS_DSM_Init(&pios_dsm_id, pios_dsm_cfg, pios_usart_com_driver,
|
||||
pios_usart_dsm_id, *proto, *bind)) {
|
||||
PIOS_Assert(0);
|
||||
}
|
||||
|
||||
@ -317,7 +318,6 @@ inline void PIOS_Board_configure_dsm(const struct pios_usart_cfg *pios_usart_dsm
|
||||
PIOS_Assert(0);
|
||||
}
|
||||
pios_rcvr_group_map[channelgroup] = pios_dsm_rcvr_id;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user