diff --git a/arch/cpu/cc26xx-cc13xx/dev/spi-hal-arch.c b/arch/cpu/cc26xx-cc13xx/dev/spi-hal-arch.c index 89c3e1c7a..cab47d9fa 100644 --- a/arch/cpu/cc26xx-cc13xx/dev/spi-hal-arch.c +++ b/arch/cpu/cc26xx-cc13xx/dev/spi-hal-arch.c @@ -27,10 +27,9 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED * OF THE POSSIBILITY OF SUCH DAMAGE. */ - +#include "contiki.h" #include "ti-lib.h" #include "spi-hal.h" -#include "spi-hal-arch.h" #include "sys/mutex.h" #include @@ -44,7 +43,15 @@ typedef struct spi_locks_s { /* One lock per SPI controller */ spi_locks_t board_spi_locks_spi[SPI_CONTROLLER_COUNT] = { { MUTEX_STATUS_UNLOCKED, NULL } }; +/*---------------------------------------------------------------------------*/ /* Arch-specific properties of each SPI controller */ +typedef struct board_spi_controller_s { + uint32_t ssi_base; + uint32_t power_domain; + uint32_t prcm_periph; + uint32_t ssi_clkgr_clk_en; +} board_spi_controller_t; + static const board_spi_controller_t spi_controller[SPI_CONTROLLER_COUNT] = { { .ssi_base = SSI0_BASE, diff --git a/arch/cpu/cc26xx-cc13xx/dev/spi-hal-arch.h b/arch/cpu/cc26xx-cc13xx/dev/spi-hal-arch.h deleted file mode 100644 index afbe3e6c2..000000000 --- a/arch/cpu/cc26xx-cc13xx/dev/spi-hal-arch.h +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright (c) 2017, University of Bristol - http://www.bristol.ac.uk/ - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the copyright holder nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY 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 "ti-lib.h" - -#include - -/*---------------------------------------------------------------------------*/ -#define BOARD_SPI_CONTROLLERS 2 -/*---------------------------------------------------------------------------*/ -#define BOARD_SPI_CONTROLLER_SPI0 0 -#define BOARD_SPI_CONTROLLER_SPI1 1 -/*---------------------------------------------------------------------------*/ -typedef struct board_spi_controller_s { - uint32_t ssi_base; - uint32_t power_domain; - uint32_t prcm_periph; - uint32_t ssi_clkgr_clk_en; -} board_spi_controller_t; - -#endif /* SPI_ARCH_H_ */ diff --git a/arch/platform/srf06-cc26xx/contiki-conf.h b/arch/platform/srf06-cc26xx/contiki-conf.h index 82daed0c1..4a1470b40 100644 --- a/arch/platform/srf06-cc26xx/contiki-conf.h +++ b/arch/platform/srf06-cc26xx/contiki-conf.h @@ -72,9 +72,6 @@ /* Platform-specific define to signify sensor reading failure */ #define CC26XX_SENSOR_READING_ERROR 0x80000000 /*---------------------------------------------------------------------------*/ -/* SPI HAL: Path to arch-specific implementation */ -#define SPI_HAL_CONF_ARCH_HDR_PATH "dev/spi-hal-arch.h" -/*---------------------------------------------------------------------------*/ /* Include CPU-related configuration */ #include "cc13xx-cc26xx-conf.h" /*---------------------------------------------------------------------------*/