Platform drivers for Mbed.
Dependents: EVAL-CN0535-FMCZ EVAL-CN0535-FMCZ EVAL-AD568x-AD569x EVAL-AD7606 ... more
inc/platform_drivers.h
- Committer:
- Mahesh Phalke
- Date:
- 2020-08-03
- Revision:
- 11:a2dcf0ebb5b5
- Parent:
- 9:9e247b9c9abf
File content as of revision 11:a2dcf0ebb5b5:
/***************************************************************************//** * @file platform_drivers.h * @brief Header file of Generic Platform Drivers. ******************************************************************************** * Copyright 2017, 2019-20(c) Analog Devices, Inc. * * All rights reserved. * * This software is proprietary to Analog Devices, Inc. and its licensors. * By using this software you agree to the terms of the associated * Analog Devices Software License Agreement. *******************************************************************************/ #ifndef PLATFORM_DRIVERS_H_ #define PLATFORM_DRIVERS_H_ // Platform drivers needs to be C-compatible to work with other drivers #ifdef __cplusplus extern "C" { #endif // _cplusplus /******************************************************************************/ /********************** Macros and Constants Definitions **********************/ /******************************************************************************/ // spi_init(), i2c_init(), i2c_write() and i2c_read() function are already defined // in mbed-os libraries. To avoid this naming conflict, the functions are wrapped // with suffix _noos using macros. #define spi_init(desc, init_param) spi_init_noos(desc, init_param) #define i2c_init(desc, init_param) i2c_init_noos(desc, init_param) #define i2c_write(desc, data, bytes_number, stop_bits) i2c_write_noos(desc, data, bytes_number, stop_bits) #define i2c_read(desc, data, bytes_number, stop_bits) i2c_read_noos(desc, data, bytes_number, stop_bits) /******************************************************************************/ /***************************** Include Files **********************************/ /******************************************************************************/ #include "util.h" #include "delay.h" #include "error.h" #include "gpio.h" #include "i2c.h" #include "spi.h" #include "uart.h" #include "irq.h" #ifdef __cplusplus // Closing extern c } #endif // _cplusplus #endif // PLATFORM_DRIVERS_H_