no-OS
ltc4332.h
Go to the documentation of this file.
1 /***************************************************************************/
34 #ifndef SRC_LTC4332_SPI_H_
35 #define SRC_LTC4332_SPI_H_
36 
37 /******************************************************************************/
38 /***************************** Include Files **********************************/
39 /******************************************************************************/
40 
41 #include "no_os_spi.h"
42 
43 /******************************************************************************/
44 /*************************** Types Declarations *******************************/
45 /******************************************************************************/
46 
52 
53 /******************************************************************************/
54 /************************ Functions Declarations ******************************/
55 /******************************************************************************/
56 
57 /* Initialize the SPI communication peripheral. */
58 int32_t ltc4332_spi_init(struct no_os_spi_desc **desc,
59  const struct no_os_spi_init_param *param);
60 
61 /* Free the resources allocated by no_os_spi_init(). */
62 int32_t ltc4332_spi_remove(struct no_os_spi_desc *desc);
63 
64 /* Write and read data to/from SPI. */
65 int32_t ltc4332_spi_write_and_read(struct no_os_spi_desc *desc, uint8_t *data,
66  uint16_t bytes_number);
67 
68 #endif /* SRC_LTC4332_SPI_H_ */
no_os_alloc.h
no_os_spi_write_and_read
int32_t no_os_spi_write_and_read(struct no_os_spi_desc *desc, uint8_t *data, uint16_t bytes_number)
Write and read data to/from SPI.
Definition: no_os_spi.c:159
no_os_spi.h
Header file of SPI Interface.
ltc4332_spi_remove
int32_t ltc4332_spi_remove(struct no_os_spi_desc *desc)
Free the resources allocated by ltc4332_spi_init().
Definition: ltc4332.c:88
no_os_spi_platform_ops
Structure holding SPI function pointers that point to the platform specific function.
Definition: no_os_spi.h:222
no_os_calloc
void * no_os_calloc(size_t nitems, size_t size)
Allocate memory and return a pointer to it, set memory to 0.
Definition: chibios_alloc.c:54
ltc4332_spi_init
int32_t ltc4332_spi_init(struct no_os_spi_desc **desc, const struct no_os_spi_init_param *param)
Initialize the SPI ltc4332 layer.
Definition: ltc4332.c:63
no_os_spi_init_param::platform_ops
const struct no_os_spi_platform_ops * platform_ops
Definition: no_os_spi.h:154
ltc4332_spi_write_and_read
int32_t ltc4332_spi_write_and_read(struct no_os_spi_desc *desc, uint8_t *data, uint16_t bytes_number)
Write and read data to/from SPI ltc4332 layer.
Definition: ltc4332.c:105
no_os_error.h
Error codes definition.
ltc4332_spi_platform_ops
const struct no_os_spi_platform_ops ltc4332_spi_platform_ops
LTC4332 specific SPI platform ops structure.
Definition: ltc4332.c:51
no_os_spi_desc::parent
struct no_os_spi_desc * parent
Definition: no_os_spi.h:214
no_os_spi_init_param::parent
struct no_os_spi_desc * parent
Definition: no_os_spi.h:160
ltc4332_spi_init
int32_t ltc4332_spi_init(struct no_os_spi_desc **desc, const struct no_os_spi_init_param *param)
Initialize the SPI ltc4332 layer.
Definition: ltc4332.c:63
no_os_spi_desc
Structure holding SPI descriptor.
Definition: no_os_spi.h:192
ltc4332.h
Header file of SPI ltc4332 Interface.
no_os_spi_desc::extra
void * extra
Definition: no_os_spi.h:212
no_os_free
void no_os_free(void *ptr)
Deallocate memory previously allocated by a call to no_os_calloc or no_os_malloc.
Definition: chibios_alloc.c:69
ltc4332_spi_remove
int32_t ltc4332_spi_remove(struct no_os_spi_desc *desc)
Free the resources allocated by ltc4332_spi_init().
Definition: ltc4332.c:88
no_os_spi_desc::platform_ops
const struct no_os_spi_platform_ops * platform_ops
Definition: no_os_spi.h:208
ltc4332_spi_write_and_read
int32_t ltc4332_spi_write_and_read(struct no_os_spi_desc *desc, uint8_t *data, uint16_t bytes_number)
Write and read data to/from SPI ltc4332 layer.
Definition: ltc4332.c:105
no_os_spi_init
int32_t no_os_spi_init(struct no_os_spi_desc **desc, const struct no_os_spi_init_param *param)
Initialize the SPI communication peripheral.
Definition: no_os_spi.c:52
ltc4332_spi_platform_ops
const struct no_os_spi_platform_ops ltc4332_spi_platform_ops
LTC4332 specific SPI platform ops structure.
Definition: ltc4332.c:51
no_os_spi_platform_ops::init
int32_t(* init)(struct no_os_spi_desc **, const struct no_os_spi_init_param *)
Definition: no_os_spi.h:224
no_os_spi_init_param
Structure holding the parameters for SPI initialization.
Definition: no_os_spi.h:140