angle5 2.0.0.0
|
Functions | |
void | angle5_cfg_setup (angle5_cfg_t *cfg) |
Config Object Initialization function. | |
ANGLE5_RETVAL | angle5_init (angle5_t *ctx, angle5_cfg_t *cfg) |
Initialization function. | |
void | angle5_default_cfg (angle5_t *ctx) |
Click Default Configuration function. | |
void | angle5_generic_transfer (angle5_t *ctx, uint8_t *wr_buf, uint16_t wr_len, uint8_t *rd_buf, uint16_t rd_len) |
Generic transfer function. | |
uint16_t | angle5_read_raw_angle (angle5_t *ctx) |
Reads Raw Angle data. | |
float | angle5_read_angle_deg (angle5_t *ctx) |
Reads Angle data in deg. | |
uint16_t | angle5_read_register (angle5_t *ctx, uint8_t reg_addr, uint8_t *rsp) |
Generic read function. | |
uint16_t | angle5_write_register (angle5_t *ctx, uint8_t reg_addr, uint8_t tx_data, uint8_t *status) |
Generic write function. | |
float | angle5_calc_rpm (float old_angle, float new_angle) |
Calculating angle data to RPM. | |
uint8_t | angle5_get_mgh_pin_state (angle5_t *ctx) |
Gets MGH (PWM) pin state. | |
uint8_t | angle5_get_mgl_pin_state (angle5_t *ctx) |
Gets MGL (INT) pin state. | |
float angle5_calc_rpm | ( | float | old_angle, |
float | new_angle ) |
Calculating angle data to RPM.
old_angle | Old Angle data ( previous measurement ) |
new_angle | New Angle data ( current measurement ) |
@description Function for calculating angle data to RPM
void angle5_cfg_setup | ( | angle5_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
@description This function initializes click configuration structure to init state.
void angle5_default_cfg | ( | angle5_t * | ctx | ) |
Click Default Configuration function.
ctx | Click object. |
@description This function executes default configuration for Angle 5 click.
void angle5_generic_transfer | ( | angle5_t * | ctx, |
uint8_t * | wr_buf, | ||
uint16_t | wr_len, | ||
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 angle5_get_mgh_pin_state | ( | angle5_t * | ctx | ) |
Gets MGH (PWM) pin state.
ctx | Click object. |
@description Function for getting MGH (PWM) pin state
uint8_t angle5_get_mgl_pin_state | ( | angle5_t * | ctx | ) |
Gets MGL (INT) pin state.
ctx | Click object. |
@description Function for getting MGL (INT) pin state
ANGLE5_RETVAL angle5_init | ( | angle5_t * | ctx, |
angle5_cfg_t * | cfg ) |
Initialization function.
ctx | Click object. |
cfg | Click configuration structure. |
@description This function initializes all necessary pins and peripherals used for this click.
float angle5_read_angle_deg | ( | angle5_t * | ctx | ) |
Reads Angle data in deg.
ctx | Click object. |
@description Use this function for reads angle data
uint16_t angle5_read_raw_angle | ( | angle5_t * | ctx | ) |
Reads Raw Angle data.
ctx | Click object. |
@description Use this function for reads raw angle data
uint16_t angle5_read_register | ( | angle5_t * | ctx, |
uint8_t | reg_addr, | ||
uint8_t * | rsp ) |
Generic read function.
ctx | Click object. |
reg_addr | Register address |
rsp | Data reads from register |
@description Use this function for reads data via SPI
uint16_t angle5_write_register | ( | angle5_t * | ctx, |
uint8_t | reg_addr, | ||
uint8_t | tx_data, | ||
uint8_t * | status ) |
Generic write function.
ctx | Click object. |
reg_addr | Register address |
tx_data | Data thet will be send |
status | Reading status |
@description Use this function for send data via SPI