62#ifndef X9CXX_STEP_DELAY_US
63 #define X9CXX_STEP_DELAY_US 10
69#ifndef X9CXX_OPERATE_DELAY_US
70 #define X9CXX_OPERATE_DELAY_US 10
76#ifndef X9CXX_STORE_DELAY_MS
77 #define X9CXX_STORE_DELAY_MS 30
156#define DRIVER_X9CXX_LINK_INIT(HANDLE, STRUCTURE) memset(HANDLE, 0, sizeof(STRUCTURE))
164#define DRIVER_X9CXX_LINK_CS_GPIO_INIT(HANDLE, FUC) (HANDLE)->cs_gpio_init = FUC
172#define DRIVER_X9CXX_LINK_CS_GPIO_DEINIT(HANDLE, FUC) (HANDLE)->cs_gpio_deinit = FUC
180#define DRIVER_X9CXX_LINK_CS_GPIO_WRITE(HANDLE, FUC) (HANDLE)->cs_gpio_write = FUC
188#define DRIVER_X9CXX_LINK_UP_DOWN_GPIO_INIT(HANDLE, FUC) (HANDLE)->up_down_gpio_init = FUC
196#define DRIVER_X9CXX_LINK_UP_DOWN_GPIO_DEINIT(HANDLE, FUC) (HANDLE)->up_down_gpio_deinit = FUC
204#define DRIVER_X9CXX_LINK_UP_DOWN_GPIO_WRITE(HANDLE, FUC) (HANDLE)->up_down_gpio_write = FUC
212#define DRIVER_X9CXX_LINK_INC_GPIO_INIT(HANDLE, FUC) (HANDLE)->inc_gpio_init = FUC
220#define DRIVER_X9CXX_LINK_INC_GPIO_DEINIT(HANDLE, FUC) (HANDLE)->inc_gpio_deinit = FUC
228#define DRIVER_X9CXX_LINK_INC_GPIO_WRITE(HANDLE, FUC) (HANDLE)->inc_gpio_write = FUC
236#define DRIVER_X9CXX_LINK_DEBUG_PRINT(HANDLE, FUC) (HANDLE)->debug_print = FUC
244#define DRIVER_X9CXX_LINK_DELAY_MS(HANDLE, FUC) (HANDLE)->delay_ms = FUC
252#define DRIVER_X9CXX_LINK_DELAY_US(HANDLE, FUC) (HANDLE)->delay_us = FUC
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_get_type(x9cxx_handle_t *handle, x9cxx_type_t *type)
get chip type
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
x9cxx handle structure definition
uint8_t(* inc_gpio_init)(void)
void(* delay_ms)(uint32_t ms)
uint8_t(* cs_gpio_deinit)(void)
void(* debug_print)(const char *const fmt,...)
uint8_t(* inc_gpio_write)(uint8_t value)
void(* delay_us)(uint32_t us)
uint8_t(* up_down_gpio_write)(uint8_t value)
uint8_t(* cs_gpio_init)(void)
uint8_t(* up_down_gpio_deinit)(void)
uint8_t(* up_down_gpio_init)(void)
uint8_t(* inc_gpio_deinit)(void)
uint8_t(* cs_gpio_write)(uint8_t value)
x9cxx information structure definition
float supply_voltage_max_v
char manufacturer_name[32]
float supply_voltage_min_v