Platform drivers for Mbed.
Dependents: EVAL-CN0535-FMCZ EVAL-CN0535-FMCZ EVAL-AD568x-AD569x EVAL-AD7606 ... more
inc/platform_drivers.h@11:a2dcf0ebb5b5, 2020-08-03 (annotated)
- Committer:
- Mahesh Phalke
- Date:
- Mon Aug 03 17:21:20 2020 +0530
- Revision:
- 11:a2dcf0ebb5b5
- Parent:
- 9:9e247b9c9abf
Updates to make platform drivers compatible with Mbed-OS 6.0 and onwards
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
mahphalke | 8:70fc373a5f46 | 1 | /***************************************************************************//** |
mahphalke | 8:70fc373a5f46 | 2 | * @file platform_drivers.h |
mahphalke | 8:70fc373a5f46 | 3 | * @brief Header file of Generic Platform Drivers. |
mahphalke | 8:70fc373a5f46 | 4 | ******************************************************************************** |
Mahesh Phalke |
11:a2dcf0ebb5b5 | 5 | * Copyright 2017, 2019-20(c) Analog Devices, Inc. |
mahphalke | 8:70fc373a5f46 | 6 | * |
mahphalke | 8:70fc373a5f46 | 7 | * All rights reserved. |
mahphalke | 8:70fc373a5f46 | 8 | * |
Mahesh Phalke |
11:a2dcf0ebb5b5 | 9 | * This software is proprietary to Analog Devices, Inc. and its licensors. |
Mahesh Phalke |
11:a2dcf0ebb5b5 | 10 | * By using this software you agree to the terms of the associated |
Mahesh Phalke |
11:a2dcf0ebb5b5 | 11 | * Analog Devices Software License Agreement. |
mahphalke | 8:70fc373a5f46 | 12 | *******************************************************************************/ |
mahphalke | 8:70fc373a5f46 | 13 | |
mahphalke | 8:70fc373a5f46 | 14 | #ifndef PLATFORM_DRIVERS_H_ |
mahphalke | 8:70fc373a5f46 | 15 | #define PLATFORM_DRIVERS_H_ |
mahphalke | 8:70fc373a5f46 | 16 | |
mahphalke | 8:70fc373a5f46 | 17 | |
mahphalke | 8:70fc373a5f46 | 18 | // Platform drivers needs to be C-compatible to work with other drivers |
mahphalke | 8:70fc373a5f46 | 19 | #ifdef __cplusplus |
mahphalke | 8:70fc373a5f46 | 20 | extern "C" |
mahphalke | 8:70fc373a5f46 | 21 | { |
mahphalke | 8:70fc373a5f46 | 22 | #endif // _cplusplus |
mahphalke | 8:70fc373a5f46 | 23 | |
mahphalke | 8:70fc373a5f46 | 24 | |
mahphalke | 8:70fc373a5f46 | 25 | /******************************************************************************/ |
mahphalke | 8:70fc373a5f46 | 26 | /********************** Macros and Constants Definitions **********************/ |
mahphalke | 8:70fc373a5f46 | 27 | /******************************************************************************/ |
mahphalke | 8:70fc373a5f46 | 28 | |
mahphalke | 8:70fc373a5f46 | 29 | // spi_init(), i2c_init(), i2c_write() and i2c_read() function are already defined |
mahphalke | 8:70fc373a5f46 | 30 | // in mbed-os libraries. To avoid this naming conflict, the functions are wrapped |
mahphalke | 8:70fc373a5f46 | 31 | // with suffix _noos using macros. |
mahphalke | 8:70fc373a5f46 | 32 | |
mahphalke | 8:70fc373a5f46 | 33 | #define spi_init(desc, init_param) spi_init_noos(desc, init_param) |
mahphalke | 8:70fc373a5f46 | 34 | |
mahphalke | 8:70fc373a5f46 | 35 | #define i2c_init(desc, init_param) i2c_init_noos(desc, init_param) |
mahphalke | 8:70fc373a5f46 | 36 | #define i2c_write(desc, data, bytes_number, stop_bits) i2c_write_noos(desc, data, bytes_number, stop_bits) |
mahphalke | 8:70fc373a5f46 | 37 | #define i2c_read(desc, data, bytes_number, stop_bits) i2c_read_noos(desc, data, bytes_number, stop_bits) |
mahphalke | 8:70fc373a5f46 | 38 | |
mahphalke | 8:70fc373a5f46 | 39 | /******************************************************************************/ |
mahphalke | 8:70fc373a5f46 | 40 | /***************************** Include Files **********************************/ |
mahphalke | 8:70fc373a5f46 | 41 | /******************************************************************************/ |
mahphalke | 8:70fc373a5f46 | 42 | |
EndaKilgarriff | 9:9e247b9c9abf | 43 | #include "util.h" |
mahphalke | 8:70fc373a5f46 | 44 | #include "delay.h" |
mahphalke | 8:70fc373a5f46 | 45 | #include "error.h" |
mahphalke | 8:70fc373a5f46 | 46 | #include "gpio.h" |
mahphalke | 8:70fc373a5f46 | 47 | #include "i2c.h" |
mahphalke | 8:70fc373a5f46 | 48 | #include "spi.h" |
EndaKilgarriff | 9:9e247b9c9abf | 49 | #include "uart.h" |
Mahesh Phalke |
11:a2dcf0ebb5b5 | 50 | #include "irq.h" |
mahphalke | 8:70fc373a5f46 | 51 | |
mahphalke | 8:70fc373a5f46 | 52 | |
mahphalke | 8:70fc373a5f46 | 53 | #ifdef __cplusplus // Closing extern c |
mahphalke | 8:70fc373a5f46 | 54 | } |
mahphalke | 8:70fc373a5f46 | 55 | #endif // _cplusplus |
mahphalke | 8:70fc373a5f46 | 56 | |
mahphalke | 8:70fc373a5f46 | 57 | #endif // PLATFORM_DRIVERS_H_ |