![]() |
Paparazzi UAS v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
|
Basic library for SRF08 telemeter. More...
Go to the source code of this file.
Functions | |
void | srf08_select_unit (uint8_t srf08_address) |
void | srf08_init (void) |
void | srf08_set_gain (uint8_t gain) |
void | srf08_set_range (uint32_t millimeters) |
void | srf08_ping (void) |
uint32_t | srf08_read_register (uint8_t srf08_register) |
void | srf08_change_i2c_address (uint8_t new_i2c_address) |
void | srf08_initiate_ranging (void) |
void | srf08_receive (void) |
Ask the value to the device. | |
void | srf08_read (void) |
Read values on the bus. | |
void | srf08_copy (void) |
Copy the I2C buffer. | |
void | srf08_event (void) |
Variables | |
uint16_t | srf08_range |
bool | srf08_received |
bool | srf08_got |
Basic library for SRF08 telemeter.
Definition in file alt_srf08.h.
#define SRF08_CENTIMETERS 0X51 |
Definition at line 68 of file alt_srf08.h.
#define SRF08_COMMAND 0 |
Definition at line 72 of file alt_srf08.h.
#define SRF08_ECHO_1 2 |
Definition at line 75 of file alt_srf08.h.
#define SRF08_ECHO_10 20 |
Definition at line 84 of file alt_srf08.h.
#define SRF08_ECHO_11 22 |
Definition at line 85 of file alt_srf08.h.
#define SRF08_ECHO_12 24 |
Definition at line 86 of file alt_srf08.h.
#define SRF08_ECHO_13 26 |
Definition at line 87 of file alt_srf08.h.
#define SRF08_ECHO_14 28 |
Definition at line 88 of file alt_srf08.h.
#define SRF08_ECHO_15 30 |
Definition at line 89 of file alt_srf08.h.
#define SRF08_ECHO_16 32 |
Definition at line 90 of file alt_srf08.h.
#define SRF08_ECHO_17 34 |
Definition at line 91 of file alt_srf08.h.
#define SRF08_ECHO_2 4 |
Definition at line 76 of file alt_srf08.h.
#define SRF08_ECHO_3 6 |
Definition at line 77 of file alt_srf08.h.
#define SRF08_ECHO_4 8 |
Definition at line 78 of file alt_srf08.h.
#define SRF08_ECHO_5 10 |
Definition at line 79 of file alt_srf08.h.
#define SRF08_ECHO_6 12 |
Definition at line 80 of file alt_srf08.h.
#define SRF08_ECHO_7 14 |
Definition at line 81 of file alt_srf08.h.
#define SRF08_ECHO_8 16 |
Definition at line 82 of file alt_srf08.h.
#define SRF08_ECHO_9 18 |
Definition at line 83 of file alt_srf08.h.
#define SRF08_I2C_BROADCAST_ADDRESS 0X00 |
Definition at line 60 of file alt_srf08.h.
#define SRF08_INCHES 0X50 |
Definition at line 67 of file alt_srf08.h.
#define SRF08_LIGHT 1 |
Definition at line 74 of file alt_srf08.h.
Definition at line 63 of file alt_srf08.h.
#define SRF08_MAX_RANGE 11008 /* in millimeters */ |
Definition at line 65 of file alt_srf08.h.
#define SRF08_MICROSECONDS 0X52 |
Definition at line 69 of file alt_srf08.h.
Definition at line 62 of file alt_srf08.h.
#define SRF08_MIN_RANGE 0 /* in millimeters */ |
Definition at line 64 of file alt_srf08.h.
#define SRF08_SET_GAIN 1 |
Definition at line 73 of file alt_srf08.h.
Definition at line 39 of file alt_srf08.h.
Definition at line 40 of file alt_srf08.h.
Definition at line 49 of file alt_srf08.h.
Definition at line 50 of file alt_srf08.h.
Definition at line 51 of file alt_srf08.h.
Definition at line 52 of file alt_srf08.h.
Definition at line 53 of file alt_srf08.h.
Definition at line 54 of file alt_srf08.h.
Definition at line 41 of file alt_srf08.h.
Definition at line 42 of file alt_srf08.h.
Definition at line 43 of file alt_srf08.h.
Definition at line 44 of file alt_srf08.h.
Definition at line 45 of file alt_srf08.h.
Definition at line 46 of file alt_srf08.h.
Definition at line 47 of file alt_srf08.h.
Definition at line 48 of file alt_srf08.h.
Copy the I2C buffer.
Definition at line 93 of file alt_srf08.c.
References i2c_transaction::buf, srf08_range, and srf_trans.
Referenced by srf08_event().
Handling of data sent by the device (initiated by srf08_receive()
Definition at line 139 of file alt_srf08.c.
References DefaultChannel, DefaultDevice, f, foo, I2CTransSuccess, srf08_copy(), srf08_got, srf08_range, srf08_read(), srf08_received, srf_trans, and i2c_transaction::status.
Setting the gain to the minimun value (to avoid echos ?)
Definition at line 50 of file alt_srf08.c.
References i2c_transaction::buf, i2c_transmit(), srf08_got, SRF08_I2C_DEV, SRF08_MIN_GAIN, srf08_received, SRF08_SET_GAIN, SRF08_UNIT_0, and srf_trans.
Definition at line 68 of file alt_srf08.c.
References i2c_transaction::buf, i2c_transmit(), LED_ON, SRF08_CENTIMETERS, SRF08_COMMAND, SRF08_I2C_DEV, SRF08_UNIT_0, and srf_trans.
Referenced by srf08_ping().
Definition at line 98 of file alt_srf08.c.
References I2CTransSuccess, srf08_initiate_ranging(), srf08_receive(), srf_trans, and i2c_transaction::status.
Read values on the bus.
Definition at line 86 of file alt_srf08.c.
References i2c_receive(), srf08_got, SRF08_I2C_DEV, SRF08_UNIT_0, and srf_trans.
Referenced by srf08_event().
Definition at line 107 of file alt_srf08.c.
References i2c_transaction::buf, foo, i2c_transceive(), SRF08_I2C_DEV, SRF08_UNIT_0, and srf_trans.
Ask the value to the device.
Definition at line 77 of file alt_srf08.c.
References i2c_transaction::buf, i2c_transmit(), LED_OFF, SRF08_ECHO_1, SRF08_I2C_DEV, srf08_received, SRF08_UNIT_0, and srf_trans.
Referenced by srf08_ping().
bool srf08_got |
Definition at line 110 of file alt_srf08.h.
|
extern |
Definition at line 45 of file alt_srf08.c.
Referenced by srf08_copy(), and srf08_event().
|
extern |
Definition at line 43 of file alt_srf08.c.
Referenced by srf08_event(), srf08_init(), and srf08_receive().