130 for (i = 0; i < times; i++)
169 for (i = 0; i < times; i++)
198 counter = rand() % 100;
210 ohm = (float)(rand() % 1000) / 10.0f;
driver x9cxx output test header file
struct x9cxx_handle_s x9cxx_handle_t
x9cxx handle structure definition
uint8_t x9cxx_set_absolute_step_counter(x9cxx_handle_t *handle, uint8_t counter, x9cxx_bool_t store_enable)
set absolute step counter
uint8_t x9cxx_increment(x9cxx_handle_t *handle, uint8_t step, x9cxx_bool_t store_enable)
increment
struct x9cxx_info_s x9cxx_info_t
x9cxx information structure definition
uint8_t x9cxx_set_type(x9cxx_handle_t *handle, x9cxx_type_t type)
set chip type
x9cxx_type_t
x9cxx type enumeration definition
uint8_t x9cxx_get_step_counter(x9cxx_handle_t *handle, uint8_t *counter)
get step counter
uint8_t x9cxx_decrement(x9cxx_handle_t *handle, uint8_t step, x9cxx_bool_t store_enable)
decrement
uint8_t x9cxx_resistor_convert_to_register(x9cxx_handle_t *handle, float ohm, uint8_t *step)
resistor convert to register
uint8_t x9cxx_reset_to_min(x9cxx_handle_t *handle, x9cxx_bool_t store_enable)
reset to min
x9cxx_bool_t
x9cxx bool enumeration definition
uint8_t x9cxx_info(x9cxx_info_t *info)
get chip's information
uint8_t x9cxx_init(x9cxx_handle_t *handle)
initialize the chip
uint8_t x9cxx_resistor_convert_to_data(x9cxx_handle_t *handle, uint8_t step, float *ohm)
resistor convert to data
uint8_t x9cxx_reset_to_max(x9cxx_handle_t *handle, x9cxx_bool_t store_enable)
reset to max
uint8_t x9cxx_deinit(x9cxx_handle_t *handle)
close the chip
void x9cxx_interface_debug_print(const char *const fmt,...)
interface print format data
uint8_t x9cxx_interface_inc_gpio_init(void)
interface inc gpio init
uint8_t x9cxx_interface_cs_gpio_write(uint8_t value)
interface cs gpio write
uint8_t x9cxx_interface_cs_gpio_init(void)
interface cs gpio init
uint8_t x9cxx_interface_inc_gpio_deinit(void)
interface inc gpio deinit
uint8_t x9cxx_interface_up_down_gpio_write(uint8_t value)
interface up down gpio write
uint8_t x9cxx_interface_up_down_gpio_deinit(void)
interface up down gpio deinit
void x9cxx_interface_delay_us(uint32_t us)
interface delay us
uint8_t x9cxx_interface_up_down_gpio_init(void)
interface up down gpio init
uint8_t x9cxx_interface_inc_gpio_write(uint8_t value)
interface inc gpio write
void x9cxx_interface_delay_ms(uint32_t ms)
interface delay ms
uint8_t x9cxx_interface_cs_gpio_deinit(void)
interface cs gpio deinit
#define DRIVER_X9CXX_LINK_INC_GPIO_WRITE(HANDLE, FUC)
link inc_gpio_write function
#define DRIVER_X9CXX_LINK_CS_GPIO_WRITE(HANDLE, FUC)
link cs_gpio_write function
#define DRIVER_X9CXX_LINK_CS_GPIO_DEINIT(HANDLE, FUC)
link cs_gpio_deinit function
#define DRIVER_X9CXX_LINK_DEBUG_PRINT(HANDLE, FUC)
link debug_print function
#define DRIVER_X9CXX_LINK_UP_DOWN_GPIO_WRITE(HANDLE, FUC)
link up_down_gpio_write function
#define DRIVER_X9CXX_LINK_DELAY_US(HANDLE, FUC)
link delay_us function
#define DRIVER_X9CXX_LINK_INC_GPIO_INIT(HANDLE, FUC)
link inc_gpio_init function
#define DRIVER_X9CXX_LINK_INIT(HANDLE, STRUCTURE)
initialize x9cxx_handle_t structure
#define DRIVER_X9CXX_LINK_UP_DOWN_GPIO_INIT(HANDLE, FUC)
link up_down_gpio_init function
#define DRIVER_X9CXX_LINK_CS_GPIO_INIT(HANDLE, FUC)
link cs_gpio_init function
#define DRIVER_X9CXX_LINK_INC_GPIO_DEINIT(HANDLE, FUC)
link inc_gpio_deinit function
#define DRIVER_X9CXX_LINK_UP_DOWN_GPIO_DEINIT(HANDLE, FUC)
link up_down_gpio_deinit function
#define DRIVER_X9CXX_LINK_DELAY_MS(HANDLE, FUC)
link delay_ms function
uint8_t x9cxx_output_test(x9cxx_type_t type, x9cxx_bool_t store_enable, uint32_t times)
output test
float supply_voltage_max_v
char manufacturer_name[32]
float supply_voltage_min_v