コード例 #1
0
ファイル: infrared_i2c.c プロジェクト: AxSt/paparazzi
/** Initialisation
 */
void infrared_i2c_init( void ) {
  ir_i2c_data_hor_available = FALSE;
  ir_i2c_data_ver_available = FALSE;
  ir_i2c_hor_status = IR_I2C_IDLE;
  ir_i2c_conf_word = IR_I2C_DEFAULT_CONF;
  ir_i2c_conf_hor_done = FALSE;
  ir_i2c_conf_ver_done = FALSE;
  irh_trans.status = I2CTransDone;
  irv_trans.status = I2CTransDone;

  infrared_struct_init();
}
コード例 #2
0
ファイル: infrared_adc.c プロジェクト: AshuLara/lisa
/** Initialize \a adc_buf_channel
 */
void infrared_adc_init(void) {
#if ! (defined SITL || defined HITL)
  adc_buf_channel(ADC_CHANNEL_IR1, &buf_ir1, ADC_CHANNEL_IR_NB_SAMPLES);
  adc_buf_channel(ADC_CHANNEL_IR2, &buf_ir2, ADC_CHANNEL_IR_NB_SAMPLES);
#ifdef ADC_CHANNEL_IR_TOP
  adc_buf_channel(ADC_CHANNEL_IR_TOP, &buf_ir3, ADC_CHANNEL_IR_NB_SAMPLES);
#endif
#endif

  infrared_struct_init();

#if ! (defined ADC_CHANNEL_IR_TOP || defined HITL || defined SITL)
  ir_adc.ir3 = IR_DEFAULT_CONTRAST;
#endif
}