For Tiva/LM MCUs, rename up_spiinitialize to tiva_spibus_initialize

This commit is contained in:
Gregory Nutt
2016-01-26 15:20:31 -06:00
parent d16978be7f
commit 8864c78e57
2 changed files with 31 additions and 23 deletions
+3 -3
View File
@@ -1,7 +1,7 @@
/****************************************************************************
* arch/arm/src/tiva/tiva_ssi.c
*
* Copyright (C) 2009-2010, 2014 Gregory Nutt. All rights reserved.
* Copyright (C) 2009-2010, 2014, 2016 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@@ -1481,7 +1481,7 @@ static void ssi_recvblock(FAR struct spi_dev_s *dev, FAR void *buffer,
****************************************************************************/
/****************************************************************************
* Name: up_spiinitialize
* Name: tiva_spibus_initialize
*
* Description:
* Initialize common parts the selected SPI port. Initialization of
@@ -1502,7 +1502,7 @@ static void ssi_recvblock(FAR struct spi_dev_s *dev, FAR void *buffer,
*
****************************************************************************/
FAR struct spi_dev_s *up_spiinitialize(int port)
FAR struct spi_dev_s *tiva_spibus_initialize(int port)
{
struct tiva_ssidev_s *priv;
irqstate_t flags;
+28 -20
View File
@@ -1,7 +1,7 @@
/************************************************************************************
* arch/arm/src/tiva/tiva_ssi.h
*
* Copyright (C) 2009-2010, 2013 Gregory Nutt. All rights reserved.
* Copyright (C) 2009-2010, 2013, 2016 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@@ -45,23 +45,11 @@
#include <stdint.h>
#include <stdbool.h>
/************************************************************************************
* Pre-processor Definitions
************************************************************************************/
/************************************************************************************
* Public Types
************************************************************************************/
/************************************************************************************
* Inline Functions
************************************************************************************/
#ifndef __ASSEMBLY__
/************************************************************************************
* Public Data
************************************************************************************/
/****************************************************************************
* Public Function Prototypes
****************************************************************************/
#if defined(__cplusplus)
extern "C"
@@ -69,15 +57,35 @@ extern "C"
#endif
/****************************************************************************
* Public Function Prototypes
* Name: tiva_spibus_initialize
*
* Description:
* Initialize common parts the selected SPI port. Initialization of
* chip select GPIOs must have been performed by board specific logic
* prior to calling this function. Specifically: GPIOs should have
* been configured for output, and all chip selects disabled.
*
* One GPIO, SS (PB2 on the eZ8F091) is reserved as a chip select. However,
* If multiple devices on on the bus, then multiple chip selects will be
* required. Theregore, all GPIO chip management is deferred to board-
* specific logic.
*
* Input Parameter:
* Port number (for hardware that has mutiple SSI interfaces)
*
* Returned Value:
* Valid SPI device structure reference on succcess; a NULL on failure
*
****************************************************************************/
FAR struct spi_dev_s *tiva_spibus_initialize(int port);
/****************************************************************************
* The external functions, tiva_spiselect, tiva_spistatus, and
* tiva_spicmddata must be provided by board-specific logic. These are
* implementations of the select, status, and cmddata methods of the SPI
* interface defined by struct spi_ops_s (see include/nuttx/spi/spi.h).
* All other methods (including up_spiinitialize()) are provided by common
* All other methods (including tiva_spibus_initialize()) are provided by common
* logic. To use this common SPI logic on your board:
*
* 1. Provide logic in tiva_boardinitialize() to configure SPI chip select
@@ -89,9 +97,9 @@ extern "C"
* the tiva_spicmddata() function in your board-specific logic. This
* functions will perform cmd/data selection operations using GPIOs in
* the way your board is configured.
* 4. Add a call to up_spiinitialize() in your low level application
* 4. Add a call to tiva_spibus_initialize() in your low level application
* initialization logic
* 5. The handle returned by up_spiinitialize() may then be used to bind the
* 5. The handle returned by tiva_spibus_initialize() may then be used to bind the
* SPI driver to higher level logic (e.g., calling
* mmcsd_spislotinitialize(), for example, will bind the SPI driver to
* the SPI MMC/SD driver).