Add some inludes explicitly

This commit is contained in:
George Oikonomou 2018-03-02 18:07:42 +00:00 committed by Xenofon (Fontas) Fafoutis
parent fe05c6f865
commit e7eee05c7d
2 changed files with 10 additions and 5 deletions

View File

@ -32,24 +32,26 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
/*---------------------------------------------------------------------------*/
#ifndef SPI_ARCH_H_
#define SPI_ARCH_H_
/*---------------------------------------------------------------------------*/
#include "contiki.h"
/*---------------------------------------------------------------------------*/
#define BOARD_SPI_CONTROLLERS 2
/*---------------------------------------------------------------------------*/
#define BOARD_SPI_CONTROLLER_SPI0 0
#define BOARD_SPI_CONTROLLER_SPI1 1
/*---------------------------------------------------------------------------*/
/* Default values for the clock rate divider */
#ifdef SPI0_CONF_CPRS_CPSDVSR
#define SPI0_CPRS_CPSDVSR SPI0_CONF_CPRS_CPSDVSR
#ifdef SPI0_CONF_CPRS_CPSDVSR
#define SPI0_CPRS_CPSDVSR SPI0_CONF_CPRS_CPSDVSR
#else
#define SPI0_CPRS_CPSDVSR 2
#endif
#ifdef SPI1_CONF_CPRS_CPSDVSR
#define SPI1_CPRS_CPSDVSR SPI1_CONF_CPRS_CPSDVSR
#ifdef SPI1_CONF_CPRS_CPSDVSR
#define SPI1_CPRS_CPSDVSR SPI1_CONF_CPRS_CPSDVSR
#else
#define SPI1_CPRS_CPSDVSR 2
#endif

View File

@ -37,8 +37,11 @@
* Implementation of the platform-independent aspects of the SPI HAL
*/
/*---------------------------------------------------------------------------*/
#include "contiki.h"
#include "spi-hal.h"
#include <stdint.h>
#include <stdbool.h>
/*---------------------------------------------------------------------------*/
spi_status_t
spi_acquire(spi_device_t *dev)