33 #include "pprzlink/messages.h"
39 #define SRF08_I2C_DEV i2c0
120 if (srf08_register >= 2) {
129 if (srf08_register >= 2) {
136 return (i2c.rx_word);
void srf08_initiate_ranging(void)
void srf08_receive(void)
Ask the value to the device.
void srf08_copy(void)
Copy the I2C buffer.
struct i2c_transaction srf_trans
uint32_t srf08_read_register(uint8_t srf08_register)
void srf08_read(void)
Read values on the bus.
Basic library for SRF08 telemeter.
#define SRF08_CENTIMETERS
Common code for AP and FBW telemetry.
volatile uint8_t buf[I2C_BUF_LEN]
Transaction buffer With I2C_BUF_LEN number of bytes.
enum I2CTransactionStatus status
Transaction status.
bool i2c_transmit(struct i2c_periph *p, struct i2c_transaction *t, uint8_t s_addr, uint8_t len)
Submit a write only transaction.
bool i2c_receive(struct i2c_periph *p, struct i2c_transaction *t, uint8_t s_addr, uint16_t len)
Submit a read only transaction.
bool i2c_transceive(struct i2c_periph *p, struct i2c_transaction *t, uint8_t s_addr, uint8_t len_w, uint16_t len_r)
Submit a write/read transaction.
@ I2CTransSuccess
transaction successfully finished by I2C driver
I2C transaction structure.
Architecture independent I2C (Inter-Integrated Circuit Bus) API.
arch independent LED (Light Emitting Diodes) API
arch independent UART (Universal Asynchronous Receiver/Transmitter) API
unsigned short uint16_t
Typedef defining 16 bit unsigned short type.
unsigned int uint32_t
Typedef defining 32 bit unsigned int type.
unsigned char uint8_t
Typedef defining 8 bit unsigned char type.
uint16_t f
Camera baseline, in meters (i.e. horizontal distance between the two cameras of the stereo setup)