diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2008-11-04 16:39:35 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2008-11-04 16:39:35 +0000 |
commit | d92e5c0852dc88fde18e4bf6ce9abb4a137e022f (patch) | |
tree | 80f3d4f8f33b55072f971a9806aa6876285502c4 /nuttx/arch | |
parent | feff83cc2bca59bfab0b6f4a2d72355f63276214 (diff) | |
download | px4-nuttx-d92e5c0852dc88fde18e4bf6ce9abb4a137e022f.tar.gz px4-nuttx-d92e5c0852dc88fde18e4bf6ce9abb4a137e022f.tar.bz2 px4-nuttx-d92e5c0852dc88fde18e4bf6ce9abb4a137e022f.zip |
Add some GPIO usage checks
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@1127 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/arch')
-rw-r--r-- | nuttx/arch/arm/src/str71x/str71x_prccu.c | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/nuttx/arch/arm/src/str71x/str71x_prccu.c b/nuttx/arch/arm/src/str71x/str71x_prccu.c index 159a32ffd..fce496e3c 100644 --- a/nuttx/arch/arm/src/str71x/str71x_prccu.c +++ b/nuttx/arch/arm/src/str71x/str71x_prccu.c @@ -76,6 +76,12 @@ #ifndef CONFIG_STR71X_I2C1 # define APB1EN_I2C1 STR71X_APB1_I2C1 #else +# ifndef CONFIG_STR71X_GPIO0 +# error "I2C1 requires GPIO0" +# endif +# ifdef CONFIG_STR71X_BSPI0 +# error "I2C1 is incompatible with BSPI0" +# endif # define APB1EN_I2C1 (0) #endif @@ -110,7 +116,10 @@ # define APB1EN_UART3 STR71X_APB1_UART3 #else # ifndef CONFIG_STR71X_GPIO0 -# error "CONFIG_STR71X_UART3 requires CONFIG_STR71X_GPIO0" +# error "UART3 requires GPIO0" +# endif +# ifdef CONFIG_STR71X_BSPI0 +# error "UART3 is incompatible with BSPI0" # endif # define APB1EN_UART3 (0) #endif @@ -130,12 +139,24 @@ #ifndef CONFIG_STR71X_BSPI0 # define APB1EN_BSPI0 STR71X_APB1_BSPI0 #else +# ifndef CONFIG_STR71X_GPIO0 +# error "BSPI0 requires GPIO0" +# endif +# ifdef CONFIG_STR71X_UART3 +# error "BSPI0 is incompatible with UART3" +# endif +# ifdef CONFIG_STR71X_I2C1 +# error "BSPI0 is incompatible with I2C1" +# endif # define APB1EN_BSPI0 (0) #endif #ifndef CONFIG_STR71X_BSPI1 # define APB1EN_BSPI1 STR71X_APB1_BSPI1 #else +# ifndef CONFIG_STR71X_GPIO0 +# error "BSPI1 requires GPIO0" +# endif # define APB1EN_BSPI1 (0) #endif |