mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-01-29 14:52:12 +01:00
i2c: rename main adapter to flexi adapter on CC
This commit is contained in:
parent
feacec468d
commit
a0089f072a
@ -903,12 +903,12 @@ const struct pios_pwm_cfg pios_pwm_cfg = {
|
|||||||
* I2C Adapters
|
* I2C Adapters
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void PIOS_I2C_main_adapter_ev_irq_handler(void);
|
void PIOS_I2C_flexi_adapter_ev_irq_handler(void);
|
||||||
void PIOS_I2C_main_adapter_er_irq_handler(void);
|
void PIOS_I2C_flexi_adapter_er_irq_handler(void);
|
||||||
void I2C2_EV_IRQHandler() __attribute__ ((alias ("PIOS_I2C_main_adapter_ev_irq_handler")));
|
void I2C2_EV_IRQHandler() __attribute__ ((alias ("PIOS_I2C_flexi_adapter_ev_irq_handler")));
|
||||||
void I2C2_ER_IRQHandler() __attribute__ ((alias ("PIOS_I2C_main_adapter_er_irq_handler")));
|
void I2C2_ER_IRQHandler() __attribute__ ((alias ("PIOS_I2C_flexi_adapter_er_irq_handler")));
|
||||||
|
|
||||||
static const struct pios_i2c_adapter_cfg pios_i2c_main_adapter_cfg = {
|
static const struct pios_i2c_adapter_cfg pios_i2c_flexi_adapter_cfg = {
|
||||||
.regs = I2C2,
|
.regs = I2C2,
|
||||||
.init = {
|
.init = {
|
||||||
.I2C_Mode = I2C_Mode_I2C,
|
.I2C_Mode = I2C_Mode_I2C,
|
||||||
@ -955,17 +955,17 @@ static const struct pios_i2c_adapter_cfg pios_i2c_main_adapter_cfg = {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
uint32_t pios_i2c_main_adapter_id;
|
uint32_t pios_i2c_flexi_adapter_id;
|
||||||
void PIOS_I2C_main_adapter_ev_irq_handler(void)
|
void PIOS_I2C_flexi_adapter_ev_irq_handler(void)
|
||||||
{
|
{
|
||||||
/* Call into the generic code to handle the IRQ for this specific device */
|
/* Call into the generic code to handle the IRQ for this specific device */
|
||||||
PIOS_I2C_EV_IRQ_Handler(pios_i2c_main_adapter_id);
|
PIOS_I2C_EV_IRQ_Handler(pios_i2c_flexi_adapter_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
void PIOS_I2C_main_adapter_er_irq_handler(void)
|
void PIOS_I2C_flexi_adapter_er_irq_handler(void)
|
||||||
{
|
{
|
||||||
/* Call into the generic code to handle the IRQ for this specific device */
|
/* Call into the generic code to handle the IRQ for this specific device */
|
||||||
PIOS_I2C_ER_IRQ_Handler(pios_i2c_main_adapter_id);
|
PIOS_I2C_ER_IRQ_Handler(pios_i2c_flexi_adapter_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* PIOS_INCLUDE_I2C */
|
#endif /* PIOS_INCLUDE_I2C */
|
||||||
|
@ -110,9 +110,9 @@ TIM4 | RC In 1 | Servo 3 | Servo 2 | Servo 1
|
|||||||
// See also pios_board.c
|
// See also pios_board.c
|
||||||
//------------------------
|
//------------------------
|
||||||
#define PIOS_I2C_MAX_DEVS 1
|
#define PIOS_I2C_MAX_DEVS 1
|
||||||
extern uint32_t pios_i2c_main_adapter_id;
|
extern uint32_t pios_i2c_flexi_adapter_id;
|
||||||
#define PIOS_I2C_MAIN_ADAPTER (pios_i2c_main_adapter_id)
|
#define PIOS_I2C_MAIN_ADAPTER (pios_i2c_flexi_adapter_id)
|
||||||
#define PIOS_I2C_ESC_ADAPTER (pios_i2c_main_adapter_id)
|
#define PIOS_I2C_ESC_ADAPTER (pios_i2c_flexi_adapter_id)
|
||||||
|
|
||||||
//-------------------------
|
//-------------------------
|
||||||
// SPI
|
// SPI
|
||||||
|
Loading…
x
Reference in New Issue
Block a user