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)
arch independent UART (Universal Asynchronous Receiver/Transmitter) API
volatile uint8_t buf[I2C_BUF_LEN]
Transaction buffer With I2C_BUF_LEN number of bytes.
transaction successfully finished by I2C driver
uint32_t srf08_read_register(uint8_t srf08_register)
void srf08_read(void)
Read values on the bus.
#define SRF08_CENTIMETERS
void srf08_copy(void)
Copy the I2C buffer.
struct i2c_transaction srf_trans
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.
I2C transaction structure.
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.
Common code for AP and FBW telemetry.
arch independent LED (Light Emitting Diodes) API
Basic library for SRF08 telemeter.
void srf08_receive(void)
Ask the value to the device.
Architecture independent I2C (Inter-Integrated Circuit Bus) API.