From 1400210989e0bf15672e5bd562321ba2a37f5672 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Fri, 8 Mar 2019 11:12:31 +0100 Subject: bsp/lpc24xx: Convert SSP driver to Linux API Use interrupts instead of polled or DMA driven mode. Change license to BSD-2-Clause. Close #3724. --- bsps/arm/lpc24xx/include/bsp/ssp.h | 54 ++++++++++++++++++++++++++------------ 1 file changed, 37 insertions(+), 17 deletions(-) (limited to 'bsps/arm/lpc24xx/include') diff --git a/bsps/arm/lpc24xx/include/bsp/ssp.h b/bsps/arm/lpc24xx/include/bsp/ssp.h index c8ec97de75..b8c870df00 100644 --- a/bsps/arm/lpc24xx/include/bsp/ssp.h +++ b/bsps/arm/lpc24xx/include/bsp/ssp.h @@ -1,42 +1,62 @@ /** * @file * - * @ingroup RTEMSBSPsARMLPC24XX_libi2c - * - * @brief LibI2C bus driver for the Synchronous Serial Port (SSP). + * @ingroup RTEMSBSPsARMLPC24XXSSP */ /* - * Copyright (c) 2008 - * Embedded Brains GmbH - * Obere Lagerstr. 30 - * D-82178 Puchheim - * Germany - * rtems@embedded-brains.de + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (C) 2008, 2019 embedded brains GmbH + * + * 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. * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 OWNER 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 LIBBSP_ARM_LPC24XX_SSP_H #define LIBBSP_ARM_LPC24XX_SSP_H -#include - #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ /** - * @ingroup RTEMSBSPsARMLPC24XX_libi2c + * @defgroup RTEMSBSPsARMLPC24XXSSP SSP Driver + * + * @ingroup RTEMSBSPsARMLPC24XX * * @{ */ -extern rtems_libi2c_bus_t * const lpc24xx_ssp_0; +#define LPC24XX_SSP_0_BUS_PATH "/dev/ssp-0" + +#define LPC24XX_SSP_1_BUS_PATH "/dev/ssp-1" + +#define LPC24XX_SSP_2_BUS_PATH "/dev/ssp-2" + +int lpc24xx_register_ssp_0(void); + +int lpc24xx_register_ssp_1(void); -extern rtems_libi2c_bus_t * const lpc24xx_ssp_1; +int lpc24xx_register_ssp_2(void); /** @} */ -- cgit v1.2.3