LibDriver X9CXX
Loading...
Searching...
No Matches
driver_x9cxx.h File Reference

driver x9cxx header file More...

#include <stdint.h>
#include <stdio.h>
#include <string.h>
Include dependency graph for driver_x9cxx.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  x9cxx_handle_s
 x9cxx handle structure definition More...
struct  x9cxx_info_s
 x9cxx information structure definition More...

Macros

#define X9CXX_STEP_DELAY_US   10
 x9cxx step delay definition
#define X9CXX_OPERATE_DELAY_US   10
 x9cxx operate delay definition
#define X9CXX_STORE_DELAY_MS   30
 x9cxx store delay definition
#define DRIVER_X9CXX_LINK_INIT(HANDLE, STRUCTURE)
 initialize x9cxx_handle_t structure
#define DRIVER_X9CXX_LINK_CS_GPIO_INIT(HANDLE, FUC)
 link cs_gpio_init function
#define DRIVER_X9CXX_LINK_CS_GPIO_DEINIT(HANDLE, FUC)
 link cs_gpio_deinit function
#define DRIVER_X9CXX_LINK_CS_GPIO_WRITE(HANDLE, FUC)
 link cs_gpio_write function
#define DRIVER_X9CXX_LINK_UP_DOWN_GPIO_INIT(HANDLE, FUC)
 link up_down_gpio_init function
#define DRIVER_X9CXX_LINK_UP_DOWN_GPIO_DEINIT(HANDLE, FUC)
 link up_down_gpio_deinit function
#define DRIVER_X9CXX_LINK_UP_DOWN_GPIO_WRITE(HANDLE, FUC)
 link up_down_gpio_write function
#define DRIVER_X9CXX_LINK_INC_GPIO_INIT(HANDLE, FUC)
 link inc_gpio_init function
#define DRIVER_X9CXX_LINK_INC_GPIO_DEINIT(HANDLE, FUC)
 link inc_gpio_deinit function
#define DRIVER_X9CXX_LINK_INC_GPIO_WRITE(HANDLE, FUC)
 link inc_gpio_write function
#define DRIVER_X9CXX_LINK_DEBUG_PRINT(HANDLE, FUC)
 link debug_print function
#define DRIVER_X9CXX_LINK_DELAY_MS(HANDLE, FUC)
 link delay_ms function
#define DRIVER_X9CXX_LINK_DELAY_US(HANDLE, FUC)
 link delay_us function

Typedefs

typedef struct x9cxx_handle_s x9cxx_handle_t
 x9cxx handle structure definition
typedef struct x9cxx_info_s x9cxx_info_t
 x9cxx information structure definition

Enumerations

enum  x9cxx_type_t { X9C102 = 1000 , X9C103 = 10000 , X9C503 = 50000 , X9C104 = 100000 }
 x9cxx type enumeration definition More...
enum  x9cxx_bool_t { X9CXX_BOOL_FALSE = 0x00 , X9CXX_BOOL_TRUE = 0x01 }
 x9cxx bool enumeration definition More...

Functions

uint8_t x9cxx_info (x9cxx_info_t *info)
 get chip's information
uint8_t x9cxx_set_type (x9cxx_handle_t *handle, x9cxx_type_t type)
 set chip type
uint8_t x9cxx_get_type (x9cxx_handle_t *handle, x9cxx_type_t *type)
 get chip type
uint8_t x9cxx_init (x9cxx_handle_t *handle)
 initialize the chip
uint8_t x9cxx_deinit (x9cxx_handle_t *handle)
 close the chip
uint8_t x9cxx_reset_to_min (x9cxx_handle_t *handle, x9cxx_bool_t store_enable)
 reset to min
uint8_t x9cxx_reset_to_max (x9cxx_handle_t *handle, x9cxx_bool_t store_enable)
 reset to max
uint8_t x9cxx_increment (x9cxx_handle_t *handle, uint8_t step, x9cxx_bool_t store_enable)
 increment
uint8_t x9cxx_decrement (x9cxx_handle_t *handle, uint8_t step, x9cxx_bool_t store_enable)
 decrement
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_get_step_counter (x9cxx_handle_t *handle, uint8_t *counter)
 get step counter
uint8_t x9cxx_resistor_convert_to_register (x9cxx_handle_t *handle, float ohm, uint8_t *step)
 resistor convert to register
uint8_t x9cxx_resistor_convert_to_data (x9cxx_handle_t *handle, uint8_t step, float *ohm)
 resistor convert to data

Detailed Description

driver x9cxx header file

Copyright (c) 2015 - present LibDriver All rights reserved

The MIT License (MIT)

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Version
1.0.0
Author
Shifeng Li
Date
2025-10-19

history

Date Version Author Description
2025/10/19 1.0 Shifeng Li first upload

Definition in file driver_x9cxx.h.