Paparazzi UAS
v5.15_devel-230-gc96ce27
Paparazzi is a free software Unmanned Aircraft System.
|
#include "std.h"
Go to the source code of this file.
Macros | |
#define | SCP1000_OPERATION 0x03 |
#define | SCP1000_HIGH_SPEED 0x09 |
#define | SCP1000_HIGH_RES 0x0A |
#define | SCP1000_ULT_LOW_PW 0x0B |
#define | SCP1000_LOW_PW 0x0C |
#define | SCP1000_DATARD8 0x7F |
#define | SCP1000_DATARD16 0x80 |
#define | SCP1000_TEMPOUT 0x81 |
#define | BARO_SCP_UNINIT 0 |
#define | BARO_SCP_IDLE 1 |
#define | BARO_SCP_RD_TEMP 2 |
#define | BARO_SCP_RD_PRESS_0 3 |
#define | BARO_SCP_RD_PRESS_1 4 |
Functions | |
void | baro_scp_init (void) |
void | baro_scp_periodic (void) |
void | baro_scp_event (void) |
Variables | |
uint8_t | baro_scp_status |
uint32_t | baro_scp_pressure |
uint16_t | baro_scp_temperature |
#define BARO_SCP_IDLE 1 |
Definition at line 18 of file baro_scp_i2c.h.
Referenced by baro_scp_event(), and baro_scp_periodic().
#define BARO_SCP_RD_PRESS_0 3 |
Definition at line 20 of file baro_scp_i2c.h.
Referenced by baro_scp_event().
#define BARO_SCP_RD_PRESS_1 4 |
Definition at line 21 of file baro_scp_i2c.h.
Referenced by baro_scp_event().
#define BARO_SCP_RD_TEMP 2 |
Definition at line 19 of file baro_scp_i2c.h.
Referenced by baro_scp_event(), and baro_scp_periodic().
#define BARO_SCP_UNINIT 0 |
Definition at line 17 of file baro_scp_i2c.h.
Referenced by baro_scp_init(), and baro_scp_periodic().
#define SCP1000_DATARD16 0x80 |
Definition at line 14 of file baro_scp_i2c.h.
Referenced by baro_scp_event().
#define SCP1000_DATARD8 0x7F |
Definition at line 13 of file baro_scp_i2c.h.
Referenced by baro_scp_event().
#define SCP1000_HIGH_RES 0x0A |
Definition at line 9 of file baro_scp_i2c.h.
Referenced by baro_scp_start_high_res_measurement().
#define SCP1000_HIGH_SPEED 0x09 |
Definition at line 8 of file baro_scp_i2c.h.
#define SCP1000_LOW_PW 0x0C |
Definition at line 11 of file baro_scp_i2c.h.
#define SCP1000_OPERATION 0x03 |
Definition at line 6 of file baro_scp_i2c.h.
Referenced by baro_scp_start_high_res_measurement().
#define SCP1000_TEMPOUT 0x81 |
Definition at line 15 of file baro_scp_i2c.h.
Referenced by baro_scp_periodic().
#define SCP1000_ULT_LOW_PW 0x0B |
Definition at line 10 of file baro_scp_i2c.h.
void baro_scp_event | ( | void | ) |
Definition at line 188 of file baro_scp.c.
References baro_scp_available, BARO_SCP_IDLE, baro_scp_pressure, BARO_SCP_RD_PRESS_0, BARO_SCP_RD_PRESS_1, BARO_SCP_RD_TEMP, BARO_SCP_SENDER_ID, baro_scp_status, baro_scp_temperature, i2c_transaction::buf, DefaultChannel, DefaultDevice, get_sys_time_usec(), i2c_transceive(), I2CTransSuccess, SCP1000_DATARD16, SCP1000_DATARD8, SCP1000_SLAVE_ADDR, SCP_I2C_DEV, scp_trans, i2c_transaction::status, and TRUE.
void baro_scp_init | ( | void | ) |
Definition at line 72 of file baro_scp.c.
References _VIC_CNTL, baro_scp_status, BARO_SCP_UNINIT, EXTINT, EXTINT_ISR(), EXTMODE, EXTPOLAR, PCLK, PINSEL1, ScpUnselect, SPI1_DRDY_EINT, SPI1_DRDY_PINSEL, SPI1_DRDY_PINSEL_BIT, SPI1_DRDY_PINSEL_VAL, SPI1_DRDY_VIC_IT, SPI1_ISR(), SPI1_VIC_SLOT, SS_IODIR, SS_PIN, SSP_CLOCK, SSP_CPHA, SSP_CPOL, SSP_DDS, SSP_FRF, SSP_LBM, SSP_MS, SSP_SCR, SSP_SOD, SSPCPSR, SSPCR0, SSPCR1, STA_UNINIT, VIC_BIT, VIC_ENABLE, VIC_SPI1, VICIntEnable, VICIntSelect, VICVectAddr11, and VICVectCntl11.
void baro_scp_periodic | ( | void | ) |
Definition at line 34 of file baro_scp.c.
References BARO_SCP_IDLE, BARO_SCP_RD_TEMP, baro_scp_start_high_res_measurement(), baro_scp_status, BARO_SCP_UNINIT, i2c_transaction::buf, i2c_transceive(), sys_time::nb_sec, SCP1000_SLAVE_ADDR, SCP1000_TEMPOUT, SCP_I2C_DEV, scp_trans, STA_INITIALISING, and STA_UNINIT.
uint32_t baro_scp_pressure |
Definition at line 25 of file baro_scp.c.
Referenced by baro_scp_event(), and SPI1_ISR().
uint8_t baro_scp_status |
Definition at line 24 of file baro_scp.c.
Referenced by baro_scp_event(), baro_scp_init(), baro_scp_periodic(), and SPI1_ISR().
uint16_t baro_scp_temperature |
Definition at line 26 of file baro_scp.c.
Referenced by baro_scp_event(), and SPI1_ISR().