diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2010-12-03 01:37:56 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2010-12-03 01:37:56 +0000 |
commit | 5076c4bb878881610884750c5a8fd43bdf99c471 (patch) | |
tree | c28e5e59c702dfc7394e9d365b9bcb7c3209b7ea /nuttx/arch/z80/src/ez80/ez80f91_spi.h | |
parent | 42a5fb251254f855b5f3911337d56f0cccfcc37f (diff) | |
download | nuttx-5076c4bb878881610884750c5a8fd43bdf99c471.tar.gz nuttx-5076c4bb878881610884750c5a8fd43bdf99c471.tar.bz2 nuttx-5076c4bb878881610884750c5a8fd43bdf99c471.zip |
Add cmddata method to the SPI interface
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3157 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/arch/z80/src/ez80/ez80f91_spi.h')
-rw-r--r-- | nuttx/arch/z80/src/ez80/ez80f91_spi.h | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/nuttx/arch/z80/src/ez80/ez80f91_spi.h b/nuttx/arch/z80/src/ez80/ez80f91_spi.h index 9e697cbbe..e27df2693 100644 --- a/nuttx/arch/z80/src/ez80/ez80f91_spi.h +++ b/nuttx/arch/z80/src/ez80/ez80f91_spi.h @@ -2,7 +2,7 @@ * arch/z80/src/ez80/ez80f91_spi.h * arch/z80/src/chip/ez80f91_spi.h * - * Copyright (C) 2009 Gregory Nutt. All rights reserved. + * Copyright (C) 2009-2010 Gregory Nutt. All rights reserved. * Author: Gregory Nutt <spudmonkey@racsa.co.cr> * * Redistribution and use in source and binary forms, with or without @@ -99,23 +99,28 @@ extern "C" { * Public Functions ************************************************************************************/ -/* The external functions, ez80_spiselect and ez80_spistatus must be provided by - * board-specific logic. The are implementations of the select and status methods - * SPI interface defined by struct spi_ops_s (see include/nuttx/spi.h). All other - * methods (including up_spiinitialize()) are provided by common logic. To use this - * common SPI logic on your board: +/* The external functions, ez80_spiselect, ez80_spistatus, ans ez80_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.h). All other methods (including up_spiinitialize()) are + * provided by common logic. To use this common SPI logic on your board: * * 1. Provide ez80_spiselect() and ez80_spistatus() functions in your board-specific * logic. This function will perform chip selection and status operations using * GPIOs in the way your board is configured. - * 2. Add a call to up_spiinitialize() in your low level initialization logic - * 3. The handle returned by up_spiinitialize() may then be used to bind the + * 2. If CONFIG_SPI_CMDDATA is defined in your NuttX configuration, provide the + * ez80_spiscmddata() function in your board-specific logic. This function will + * perform cmd/data selection operations using GPIOs in the way your board is + * configured. + * 3. Add a call to up_spiinitialize() in your low level initialization logic + * 4. The handle returned by up_spiinitialize() 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). */ EXTERN void ez80_spiselect(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected); EXTERN uint8_t ez80_spistatus(FAR struct spi_dev_s *dev, enum spi_dev_e devid); +EXTERN int ez80_spicmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd); #undef EXTERN #ifdef __cplusplus |