no-OS
platform_drivers.h
Go to the documentation of this file.
1 /***************************************************************************/
40 #ifndef PLATFORM_DRIVERS_H_
41 #define PLATFORM_DRIVERS_H_
42 
43 /******************************************************************************/
44 /***************************** Include Files **********************************/
45 /******************************************************************************/
46 #include "no_os_delay.h"
47 #include "no_os_error.h"
48 #include "no_os_gpio.h"
49 #include "no_os_i2c.h"
50 #include "no_os_spi.h"
51 
52 #endif // PLATFORM_DRIVERS_H_
UART_PL
@ UART_PL
Definition: uart_extra.h:63
xil_uart_desc::fifo
struct no_os_fifo_element * fifo
Definition: uart_extra.h:94
generic_gpio_get
int32_t generic_gpio_get(struct no_os_gpio_desc **desc, const struct no_os_gpio_init_param *param)
Obtain the GPIO decriptor.
Definition: generic_gpio.c:58
generic_gpio_get_value
int32_t generic_gpio_get_value(struct no_os_gpio_desc *desc, uint8_t *value)
Get the value of the specified GPIO.
Definition: generic_gpio.c:192
no_os_gpio_init_param
Structure holding the parameters for GPIO initialization.
Definition: no_os_gpio.h:85
uart_extra.h
no_os_uart_read
int32_t no_os_uart_read(struct no_os_uart_desc *desc, uint8_t *data, uint32_t bytes_number)
Read data from UART device.
Definition: no_os_uart.c:58
no_os_uart_init_param::extra
void * extra
Definition: no_os_uart.h:119
no_os_callback_desc
Structure describing a callback to be registered.
Definition: no_os_irq.h:136
xil_uart_desc::irq_desc
struct no_os_irq_ctrl_desc * irq_desc
Definition: uart_extra.h:92
no_os_spi.h
Header file of SPI Interface.
no_os_irq.h
Header file of IRQ interface.
xil_uart_init_param::type
enum xil_uart_type type
Definition: uart_extra.h:75
no_os_irq_register_callback
int32_t no_os_irq_register_callback(struct no_os_irq_ctrl_desc *desc, uint32_t irq_id, struct no_os_callback_desc *callback_desc)
Register a callback to handle the irq events.
Definition: no_os_irq.c:82
xil_uart_desc::buff
char buff[UART_BUFF_LENGTH]
Definition: uart_extra.h:98
xil_uart_desc
Xilinx platform specific UART descriptor.
Definition: uart_extra.h:86
generic_gpio_get_direction
int32_t generic_gpio_get_direction(struct no_os_gpio_desc *desc, uint8_t *direction)
Get the direction of the specified GPIO.
Definition: generic_gpio.c:147
xil_uart_desc::bytes_received
uint32_t bytes_received
Definition: uart_extra.h:100
no_os_uart_init
int32_t no_os_uart_init(struct no_os_uart_desc **desc, struct no_os_uart_init_param *param)
Initialize the UART communication peripheral.
Definition: no_os_uart.c:162
no_os_spi_platform_ops
Structure holding SPI function pointers that point to the platform specific function.
Definition: no_os_spi.h:153
no_os_delay.h
Header file of Delay functions.
no_os_uart_desc::baud_rate
uint32_t baud_rate
Definition: no_os_uart.h:134
no_os_trng_fill_buffer
int32_t no_os_trng_fill_buffer(struct no_os_trng_desc *desc, uint8_t *buff, uint32_t len)
Fill buffer with random numbers.
Definition: no_os_trng.c:81
generic_gpio_get_optional
int32_t generic_gpio_get_optional(struct no_os_gpio_desc **desc, const struct no_os_gpio_init_param *param)
Get the value of an optional GPIO.
Definition: generic_gpio.c:78
WRITE_SIZE
#define WRITE_SIZE
Definition: no_os_uart.c:56
no_os_uart_get_errors
uint32_t no_os_uart_get_errors(struct no_os_uart_desc *desc)
Get number of UART errors.
Definition: no_os_uart.c:195
u8
unsigned char u8
Definition: wrapper.h:156
xil_uart_init_param::irq_id
uint32_t irq_id
Definition: uart_extra.h:77
xil_uart_desc::type
enum xil_uart_type type
Definition: uart_extra.h:88
no_os_uart_desc::device_id
uint8_t device_id
Definition: no_os_uart.h:128
generic_spi_init
int32_t generic_spi_init(struct no_os_spi_desc **desc, const struct no_os_spi_init_param *param)
Initialize the SPI communication peripheral.
Definition: generic_spi.c:56
no_os_fifo.h
Header file of fifo.
UART_BUFF_LENGTH
#define UART_BUFF_LENGTH
Definition: uart_extra.h:51
no_os_uart_desc
Stucture holding the UART descriptor.
Definition: no_os_uart.h:126
no_os_trng_desc
TRNG Descriptor.
Definition: aducm3029_trng.c:67
no_os_error.h
Error codes definition.
generic_spi_ops
const struct no_os_spi_platform_ops generic_spi_ops
Generic platform SPI ops.
Definition: generic_spi.c:113
no_os_trng.h
Header file of true random number generator.
xil_uart_desc::total_error_count
uint32_t total_error_count
Definition: uart_extra.h:102
no_os_fifo_element::len
uint32_t len
Definition: no_os_fifo.h:62
no_os_i2c_init_param::max_speed_hz
uint32_t max_speed_hz
Definition: no_os_i2c.h:68
no_os_uart_desc::extra
void * extra
Definition: no_os_uart.h:136
no_os_fifo_insert
int32_t no_os_fifo_insert(struct no_os_fifo_element **p_fifo, char *buff, uint32_t len)
no_os_trng_init
int32_t no_os_trng_init(struct no_os_trng_desc **desc, struct no_os_trng_init_param *param)
Initialize descriptor.
Definition: no_os_trng.c:63
no_os_fifo_remove
struct no_os_fifo_element * no_os_fifo_remove(struct no_os_fifo_element *p_fifo)
no_os_trng_init_param
Init parameter for TRNG.
Definition: no_os_trng.h:64
NO_OS_UNUSED_PARAM
#define NO_OS_UNUSED_PARAM(x)
Definition: no_os_util.h:115
generic_spi_write_and_read
int32_t generic_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: generic_spi.c:91
no_os_spi_desc
Structure holding SPI descriptor.
Definition: no_os_spi.h:132
no_os_uart_write
int32_t no_os_uart_write(struct no_os_uart_desc *desc, const uint8_t *data, uint32_t bytes_number)
Write data to UART device.
Definition: no_os_uart.c:83
generic_gpio_remove
int32_t generic_gpio_remove(struct no_os_gpio_desc *desc)
Free the resources allocated by no_os_gpio_get().
Definition: generic_gpio.c:94
UART_PS
@ UART_PS
Definition: uart_extra.h:65
no_os_trng_remove
void no_os_trng_remove(struct no_os_trng_desc *desc)
Free resources allocated in descriptor.
Definition: no_os_trng.c:73
xil_uart_init_param
Structure holding the initialization parameters for Xilinx platform specific UART parameters.
Definition: uart_extra.h:73
no_os_i2c_write
int32_t no_os_i2c_write(struct no_os_i2c_desc *desc, uint8_t *data, uint8_t bytes_number, uint8_t stop_bit)
Write data to a slave device.
Definition: i2c.c:94
no_os_gpio_desc
Structure holding the GPIO descriptor.
Definition: no_os_gpio.h:102
xil_uart_init_param::irq_desc
struct no_os_irq_ctrl_desc * irq_desc
Definition: uart_extra.h:79
no_os_uart_init_param::baud_rate
uint32_t baud_rate
Definition: no_os_uart.h:111
no_os_i2c_desc
Structure holding I2C descriptor.
Definition: no_os_i2c.h:81
irq_desc
Structure for Interrupt Request descriptor.
no_os_gpio_get
int32_t no_os_gpio_get(struct no_os_gpio_desc **desc, const struct no_os_gpio_init_param *param)
Obtain the GPIO decriptor.
Definition: no_os_gpio.c:55
no_os_uart_read_nonblocking
int32_t no_os_uart_read_nonblocking(struct no_os_uart_desc *desc, uint8_t *data, uint32_t bytes_number)
Submit reading buffer to the UART driver.
Definition: no_os_uart.c:110
no_os_i2c.h
Header file of I2C Interface.
no_os_spi_init_param::max_speed_hz
uint32_t max_speed_hz
Definition: no_os_spi.h:116
xil_uart_desc::instance
void * instance
Definition: uart_extra.h:104
generic_gpio_direction_input
int32_t generic_gpio_direction_input(struct no_os_gpio_desc *desc)
Enable the input direction of the specified GPIO.
Definition: generic_gpio.c:108
no_os_i2c_read
int32_t no_os_i2c_read(struct no_os_i2c_desc *desc, uint8_t *data, uint8_t bytes_number, uint8_t stop_bit)
Read data from a slave device.
Definition: i2c.c:128
no_os_i2c_init_param
Structure holding the parameters for I2C initialization.
Definition: no_os_i2c.h:64
NULL
#define NULL
Definition: wrapper.h:64
no_os_uart_init_param
Structure holding the parameters for UART initialization.
Definition: no_os_uart.h:103
generic_gpio_ops
const struct no_os_gpio_platform_ops generic_gpio_ops
Generic platform GPIO ops.
Definition: generic_gpio.c:209
no_os_fifo_element::data
char * data
Definition: no_os_fifo.h:60
no_os_uart_init_param::device_id
uint8_t device_id
Definition: no_os_uart.h:105
xil_uart_desc::fifo_read_offset
uint32_t fifo_read_offset
Definition: uart_extra.h:96
no_os_uart_remove
int32_t no_os_uart_remove(struct no_os_uart_desc *desc)
Free the resources allocated by no_os_uart_init().
Definition: no_os_uart.c:181
no_os_irq_enable
int32_t no_os_irq_enable(struct no_os_irq_ctrl_desc *desc, uint32_t irq_id)
Enable specific interrupt.
Definition: no_os_irq.c:144
no_os_gpio_platform_ops
Structure holding gpio function pointers that point to the platform specific function.
Definition: no_os_gpio.h:133
no_os_uart_write_nonblocking
int32_t no_os_uart_write_nonblocking(struct no_os_uart_desc *desc, const uint8_t *data, uint32_t bytes_number)
Submit writting buffer to the UART driver.
Definition: no_os_uart.c:137
no_os_gpio.h
Header file of GPIO Interface.
generic_gpio_set_value
int32_t generic_gpio_set_value(struct no_os_gpio_desc *desc, uint8_t value)
Set the value of the specified GPIO.
Definition: generic_gpio.c:170
no_os_uart.h
Header file of UART interface.
no_os_util.h
Header file of utility functions.
xil_uart_desc::irq_id
uint32_t irq_id
Definition: uart_extra.h:90
no_os_gpio_platform_ops::gpio_ops_get
int32_t(* gpio_ops_get)(struct no_os_gpio_desc **, const struct no_os_gpio_init_param *)
Definition: no_os_gpio.h:135
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:155
no_os_irq_disable
int32_t no_os_irq_disable(struct no_os_irq_ctrl_desc *desc, uint32_t irq_id)
Disable specific interrupt.
Definition: no_os_irq.c:155
no_os_irq_ctrl_desc
Definition: no_os_irq.h:119
no_os_i2c_init
int32_t no_os_i2c_init(struct no_os_i2c_desc **desc, const struct no_os_i2c_init_param *param)
Initialize the I2C communication peripheral.
Definition: i2c.c:56
no_os_i2c_remove
int32_t no_os_i2c_remove(struct no_os_i2c_desc *desc)
Free the resources allocated by no_os_i2c_init().
Definition: i2c.c:75
generic_gpio_direction_output
int32_t generic_gpio_direction_output(struct no_os_gpio_desc *desc, uint8_t value)
Enable the output direction of the specified GPIO.
Definition: generic_gpio.c:125
generic_spi_remove
int32_t generic_spi_remove(struct no_os_spi_desc *desc)
Free the resources allocated by no_os_spi_init().
Definition: generic_spi.c:75
no_os_spi_init_param
Structure holding the parameters for SPI initialization.
Definition: no_os_spi.h:112