mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-01-17 02:52:12 +01:00
lowered I2C timoout whne using RTOS
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@842 ebee16cc-31ac-478f-84a7-5cbb03baadba
This commit is contained in:
parent
d48e80c684
commit
3bc938d45e
@ -106,8 +106,8 @@ TIM8 | | | |
|
||||
#define PIOS_I2C_SCL_PIN GPIO_Pin_6
|
||||
#define PIOS_I2C_SDA_PIN GPIO_Pin_7
|
||||
#define PIOS_I2C_DUTY_CYCLE I2C_DutyCycle_2
|
||||
#define PIOS_I2C_BUS_FREQ 400000
|
||||
#define PIOS_I2C_TIMEOUT_VALUE 5000
|
||||
#define PIOS_I2C_BUS_FREQ 400000 // bit/s
|
||||
#define PIOS_I2C_TIMEOUT_VALUE 50 // ms
|
||||
#define PIOS_I2C_IRQ_EV_HANDLER void I2C1_EV_IRQHandler(void)
|
||||
#define PIOS_I2C_IRQ_ER_HANDLER void I2C1_ER_IRQHandler(void)
|
||||
#define PIOS_I2C_IRQ_EV_CHANNEL I2C1_EV_IRQn
|
||||
|
@ -85,8 +85,8 @@ TIM8 | Servo 5 | Servo 6 | Servo 7 | Servo 8
|
||||
#define PIOS_I2C_SDA_PIN GPIO_Pin_11
|
||||
#define PIOS_I2C_SCL_PIN GPIO_Pin_10
|
||||
#define PIOS_I2C_DUTY_CYCLE I2C_DutyCycle_2
|
||||
#define PIOS_I2C_BUS_FREQ 400000
|
||||
#define PIOS_I2C_TIMEOUT_VALUE 5000
|
||||
#define PIOS_I2C_BUS_FREQ 400000 // bit/s
|
||||
#define PIOS_I2C_TIMEOUT_VALUE 50 // ms
|
||||
#define PIOS_I2C_IRQ_EV_HANDLER void I2C2_EV_IRQHandler(void)
|
||||
#define PIOS_I2C_IRQ_ER_HANDLER void I2C2_ER_IRQHandler(void)
|
||||
#define PIOS_I2C_IRQ_EV_CHANNEL I2C2_EV_IRQn
|
||||
|
@ -327,7 +327,7 @@ int32_t PIOS_I2C_TransferWait(void)
|
||||
}
|
||||
|
||||
#else
|
||||
uint32_t repeat_ctr = PIOS_I2C_TIMEOUT_VALUE;
|
||||
uint32_t repeat_ctr = PIOS_I2C_TIMEOUT_VALUE*100; // FIXME
|
||||
uint16_t last_buffer_ix = i2cx->buffer_ix;
|
||||
|
||||
if (i2cx->transfer_state.BUSY)
|
||||
|
Loading…
x
Reference in New Issue
Block a user