summaryrefslogtreecommitdiff
path: root/nuttx/arch/arm/src/lpc43xx/chip
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2012-07-18 21:04:15 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2012-07-18 21:04:15 +0000
commit08acfbbbbfc832365e3f28a73b7f059d885082f4 (patch)
tree8a3575703c070ff21b32c5ffcf95611e96bdb63f /nuttx/arch/arm/src/lpc43xx/chip
parentd5c888e4eb96f7e781d2ab5079d462d19a63a882 (diff)
downloadpx4-nuttx-08acfbbbbfc832365e3f28a73b7f059d885082f4.tar.gz
px4-nuttx-08acfbbbbfc832365e3f28a73b7f059d885082f4.tar.bz2
px4-nuttx-08acfbbbbfc832365e3f28a73b7f059d885082f4.zip
Update driver to work with and external SPIFI library (vs. ROM)
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4952 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/arch/arm/src/lpc43xx/chip')
-rw-r--r--nuttx/arch/arm/src/lpc43xx/chip/lpc43_spifi.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/nuttx/arch/arm/src/lpc43xx/chip/lpc43_spifi.h b/nuttx/arch/arm/src/lpc43xx/chip/lpc43_spifi.h
index 053b1947e..3b9913061 100644
--- a/nuttx/arch/arm/src/lpc43xx/chip/lpc43_spifi.h
+++ b/nuttx/arch/arm/src/lpc43xx/chip/lpc43_spifi.h
@@ -187,6 +187,7 @@ struct spifi_operands_s
/* Interface to SPIFI ROM driver */
+#ifndef CONFIG_SPIFI_LIBRARY
struct spifi_driver_s
{
int32_t (*spifi_init)(struct spifi_dev_s *dev, uint32_t cshigh,
@@ -233,6 +234,7 @@ struct spifi_driver_s
uint16_t value);
int32_t (*wait_busy)(struct spifi_dev_s *dev, uint8_t prog_or_erase);
};
+#endif
/****************************************************************************
* Private Data
@@ -246,5 +248,14 @@ struct spifi_driver_s
* Public Functions
****************************************************************************/
+#ifdef CONFIG_SPIFI_LIBRARY
+EXTERN int32_t spifi_init(struct spifi_dev_s *dev, uint32_t cshigh,
+ uint32_t options, uint32_t mhz);
+EXTERN int32_t spifi_program(struct spifi_dev_s *dev, const uint8_t *source,
+ struct spifi_operands_s *opers);
+EXTERN int32_t spifi_erase(struct spifi_dev_s *dev,
+ struct spifi_operands_s *opers);
+#endif
+
#endif /* __ARCH_ARM_SRC_LPC43XX_CHIP_LPC43_SPIFI_H */