\anchor ads1263-drv-c
Object oriented C driver implemenation for the ADS1263
BSD-2 Clause. See LICENCE file for additional information
- ./ads1263.h - header file of the driver
- ./ads1263.c - code file of the driver
- ./LICENCE - licence file
- ./CMakeLists.txt - CMake file
- ./README.md - this file
For work with this driver you should follow these steps:
-
Include this repo to your project (manually, with CMake 'add_subdirectory', with CMake 'FetchContent')
-
link the library
ads1263
to your application if you use CMake -
Define and implement following functions with signatures (names of functions may be specific for you):
-
spiTransfer(uint8_t tx, uint8_t rx, uint8_t len)
- transfer data over SPI -
setCS(uint8_t state)
- control CS line. Whenstate
equals to1
a state of line is HIGH -
setReset(uint8_t state)
- control RESET line. Whenstate
equals to1
a state of line is HIGH -
setStart(uint8_t state)
- control START line. Whenstate
equals to1
a state of line is HIGH -
DelayMs(uint32_t delay)
- delay in milliseconds
-
-
Init main structure with pointers to your implemented functions at prevous step:
//object declaration ads1263_t ads1263; //populate object pointers ads1263.Transfer = spiTransfer; ads1263.SetCS = setCS; ads1263.SetReset = setReset; ads1263.SetStart = setStart; ads1263.DelayMs = DelayMs; // ads126 initialization ADS1263_Init(&ads1263);