Example Program for EVAL-AD7606
Dependencies: platform_drivers
app/iio_transport.h@5:42b1eeef29d9, 2020-10-19 (annotated)
- Committer:
- Kjansen45
- Date:
- Mon Oct 19 07:54:56 2020 +0000
- Revision:
- 5:42b1eeef29d9
- Parent:
- 1:819ac9aa5667
Repository update
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
mahphalke |
1:819ac9aa5667 | 1 | /***************************************************************************//** |
mahphalke |
1:819ac9aa5667 | 2 | * @file iio_transport.h |
mahphalke |
1:819ac9aa5667 | 3 | * @brief Header file of iio_transport. |
mahphalke |
1:819ac9aa5667 | 4 | * @author |
mahphalke |
1:819ac9aa5667 | 5 | ******************************************************************************** |
mahphalke |
1:819ac9aa5667 | 6 | * Copyright (c) 2020 Analog Devices, Inc. |
mahphalke |
1:819ac9aa5667 | 7 | * |
mahphalke |
1:819ac9aa5667 | 8 | * This software is proprietary to Analog Devices, Inc. and its licensors. |
mahphalke |
1:819ac9aa5667 | 9 | * By using this software you agree to the terms of the associated |
mahphalke |
1:819ac9aa5667 | 10 | * Analog Devices Software License Agreement. |
mahphalke |
1:819ac9aa5667 | 11 | *******************************************************************************/ |
mahphalke |
1:819ac9aa5667 | 12 | |
mahphalke |
1:819ac9aa5667 | 13 | #ifndef IIO_TRANSPORT_H_ |
mahphalke |
1:819ac9aa5667 | 14 | #define IIO_TRANSPORT_H_ |
mahphalke |
1:819ac9aa5667 | 15 | |
mahphalke |
1:819ac9aa5667 | 16 | /******************************************************************************/ |
mahphalke |
1:819ac9aa5667 | 17 | /***************************** Include Files **********************************/ |
mahphalke |
1:819ac9aa5667 | 18 | /******************************************************************************/ |
mahphalke |
1:819ac9aa5667 | 19 | |
mahphalke |
1:819ac9aa5667 | 20 | #include "iio.h" |
mahphalke |
1:819ac9aa5667 | 21 | #include "platform_drivers.h" |
mahphalke |
1:819ac9aa5667 | 22 | |
mahphalke |
1:819ac9aa5667 | 23 | /******************************************************************************/ |
mahphalke |
1:819ac9aa5667 | 24 | /********************** Macros and Constants Definition ***********************/ |
mahphalke |
1:819ac9aa5667 | 25 | /******************************************************************************/ |
mahphalke |
1:819ac9aa5667 | 26 | |
mahphalke |
1:819ac9aa5667 | 27 | /* Baud rate for IIO UART interface */ |
mahphalke |
1:819ac9aa5667 | 28 | #define IIO_UART_BAUD_RATE (230400U) |
mahphalke |
1:819ac9aa5667 | 29 | |
mahphalke |
1:819ac9aa5667 | 30 | /******************************************************************************/ |
mahphalke |
1:819ac9aa5667 | 31 | /*************************** Types Declarations *******************************/ |
mahphalke |
1:819ac9aa5667 | 32 | /******************************************************************************/ |
mahphalke |
1:819ac9aa5667 | 33 | |
mahphalke |
1:819ac9aa5667 | 34 | /******************************************************************************/ |
mahphalke |
1:819ac9aa5667 | 35 | /************************ Functions Declarations ******************************/ |
mahphalke |
1:819ac9aa5667 | 36 | /******************************************************************************/ |
mahphalke |
1:819ac9aa5667 | 37 | |
mahphalke |
1:819ac9aa5667 | 38 | /* UART peripheral init wrapper */ |
mahphalke |
1:819ac9aa5667 | 39 | int32_t iio_uart_init(struct uart_desc **desc, struct uart_init_param *param); |
mahphalke |
1:819ac9aa5667 | 40 | |
mahphalke |
1:819ac9aa5667 | 41 | /* UART data write wrapper */ |
mahphalke |
1:819ac9aa5667 | 42 | ssize_t iio_uart_write(const char *buf, size_t len); |
mahphalke |
1:819ac9aa5667 | 43 | |
mahphalke |
1:819ac9aa5667 | 44 | /* UART data read wrapper */ |
mahphalke |
1:819ac9aa5667 | 45 | ssize_t iio_uart_read(char *buf, size_t len); |
mahphalke |
1:819ac9aa5667 | 46 | |
mahphalke |
1:819ac9aa5667 | 47 | /* IIO command detect monitor */ |
mahphalke |
1:819ac9aa5667 | 48 | bool is_new_iio_command_detected(void); |
mahphalke |
1:819ac9aa5667 | 49 | |
mahphalke |
1:819ac9aa5667 | 50 | /* Check for specific IIO command */ |
mahphalke |
1:819ac9aa5667 | 51 | bool check_iio_cmd(const char *cmd_str, uint8_t len); |
mahphalke |
1:819ac9aa5667 | 52 | |
mahphalke |
1:819ac9aa5667 | 53 | /* IIO UART receive interrupt callback function */ |
mahphalke |
1:819ac9aa5667 | 54 | void iio_uart_rx_callback(void); |
mahphalke |
1:819ac9aa5667 | 55 | |
mahphalke |
1:819ac9aa5667 | 56 | #endif /* IIO_TRANSPORT_H_ */ |