|
magneto4
2.0.0.0
|
Functions | |
| void | magneto4_cfg_setup (magneto4_cfg_t *cfg) |
| Config Object Initialization function. More... | |
| MAGNETO4_RETVAL | magneto4_init (magneto4_t *ctx, magneto4_cfg_t *cfg) |
| Initialization function. More... | |
| void | magneto4_default_cfg (magneto4_t *ctx) |
| Click Default Configuration function. More... | |
| void | magneto4_generic_transfer (magneto4_t *ctx, uint8_t *rd_buf, uint16_t rd_len) |
| Generic transfer function. More... | |
| uint8_t | magneto4_get_out_a (magneto4_t *ctx) |
| Get A ( AN ) pin status. More... | |
| uint8_t | magneto4_get_out_b (magneto4_t *ctx) |
| Get B ( RST ) pin status. More... | |
| uint8_t | magneto4_get_index (magneto4_t *ctx) |
| Get IND ( interrupt ) pin status. More... | |
| uint32_t | magneto4_start_measurement (magneto4_t *ctx) |
| Measurement function. More... | |
| uint16_t | magneto4_get_magnetic_field (magneto4_t *ctx) |
| Measurement Field. More... | |
| uint8_t | magneto4_get_magnetic_status (magneto4_t *ctx, mag_status_t *mag_status) |
| Get Magnetic measurement status. More... | |
| uint8_t | magneto4_get_encoder_direction (magneto4_t *ctx) |
| Encoder direction. More... | |
| void | magneto4_get_encoder_position (magneto4_t *ctx) |
| Encoder position. More... | |
| void | magneto4_set_start_position (magneto4_t *ctx, int32_t encoder_pos) |
| Set start encoder position. More... | |
| void magneto4_cfg_setup | ( | magneto4_cfg_t * | cfg | ) |
Config Object Initialization function.
| cfg | Click configuration structure. |
@description This function initializes click configuration structure to init state.
| void magneto4_default_cfg | ( | magneto4_t * | ctx | ) |
Click Default Configuration function.
| ctx | Click object. |
@description This function executes default configuration for Magneto4 click.
| void magneto4_generic_transfer | ( | magneto4_t * | ctx, |
| uint8_t * | rd_buf, | ||
| uint16_t | rd_len | ||
| ) |
Generic transfer function.
| ctx | Click object. |
| wr_buf | Write data buffer |
| wr_len | Number of byte in write data buffer |
| rd_buf | Read data buffer |
| rd_len | Number of byte in read data buffer |
@description Generic SPI transfer, for sending and receiving packages
| uint8_t magneto4_get_encoder_direction | ( | magneto4_t * | ctx | ) |
Encoder direction.
| ctx | Click object. |
@description This function gives you information on the direction of the magnet movement.
| void magneto4_get_encoder_position | ( | magneto4_t * | ctx | ) |
Encoder position.
| ctx | Click object. |
@description This function get encoder position.
| uint8_t magneto4_get_index | ( | magneto4_t * | ctx | ) |
Get IND ( interrupt ) pin status.
| ctx | Click object. |
@description Functions for get IND ( interrupt ) pin status.
| uint16_t magneto4_get_magnetic_field | ( | magneto4_t * | ctx | ) |
Measurement Field.
| ctx | Click object. |
@description This function measure magnetic field strength. Use this function to detect the presence of a magnet.
| uint8_t magneto4_get_magnetic_status | ( | magneto4_t * | ctx, |
| mag_status_t * | mag_status | ||
| ) |
Get Magnetic measurement status.
| ctx | Click object. |
| mag_status | Structure that contains status information. |
@description This function gets magnetic measurement status data.
| uint8_t magneto4_get_out_a | ( | magneto4_t * | ctx | ) |
Get A ( AN ) pin status.
| ctx | Click object. |
@description Functions for get A ( AN ) pin status.
| uint8_t magneto4_get_out_b | ( | magneto4_t * | ctx | ) |
Get B ( RST ) pin status.
| ctx | Click object. |
@description Functions for get B ( RST ) pin status.
| MAGNETO4_RETVAL magneto4_init | ( | magneto4_t * | ctx, |
| magneto4_cfg_t * | cfg | ||
| ) |
Initialization function.
| magneto4 | Click object. |
| cfg | Click configuration structure. |
@description This function initializes all necessary pins and peripherals used for this click.
| void magneto4_set_start_position | ( | magneto4_t * | ctx, |
| int32_t | encoder_pos | ||
| ) |
Set start encoder position.
| ctx | Click object. |
| encoder_pos | Start encoder position. |
@description Use this function to set the start position of the encoder. If this function is not called - the start position encoder will be 0.
| uint32_t magneto4_start_measurement | ( | magneto4_t * | ctx | ) |
Measurement function.
| ctx | Click object. |
@description This function reading 24-bit data from the SPI.