diff options
author | patacongo <patacongo@7fd9a85b-ad96-42d3-883c-3090e2eb8679> | 2012-05-01 23:31:47 +0000 |
---|---|---|
committer | patacongo <patacongo@7fd9a85b-ad96-42d3-883c-3090e2eb8679> | 2012-05-01 23:31:47 +0000 |
commit | ea2402e9cc14d2b7a969d3873da8524dc8aae9b1 (patch) | |
tree | 8fee6fd1421f4d25031cd8dec12d9723dfebef78 /nuttx/arch | |
parent | 51c1f0c7bdd4090976b6803483fa6ebff1b7baab (diff) | |
download | px4-firmware-ea2402e9cc14d2b7a969d3873da8524dc8aae9b1.tar.gz px4-firmware-ea2402e9cc14d2b7a969d3873da8524dc8aae9b1.tar.bz2 px4-firmware-ea2402e9cc14d2b7a969d3873da8524dc8aae9b1.zip |
Missed Calypso file
git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@4685 7fd9a85b-ad96-42d3-883c-3090e2eb8679
Diffstat (limited to 'nuttx/arch')
-rw-r--r-- | nuttx/arch/arm/src/calypso/calypso_spi.h | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/nuttx/arch/arm/src/calypso/calypso_spi.h b/nuttx/arch/arm/src/calypso/calypso_spi.h new file mode 100644 index 000000000..cb44a6291 --- /dev/null +++ b/nuttx/arch/arm/src/calypso/calypso_spi.h @@ -0,0 +1,30 @@ +#ifndef ___ARCH_ARM_SRC_CALYPSO_CALYPSO_SPI_H +#define ___ARCH_ARM_SRC_CALYPSO_CALYPSO_SPI_H + +#define BASE_ADDR_SPI 0xfffe3000 +#define SPI_REG(n) (BASE_ADDR_SPI+(n)) + +enum spi_regs { + REG_SET1 = 0x00, + REG_SET2 = 0x02, + REG_CTRL = 0x04, + REG_STATUS = 0x06, + REG_TX_LSB = 0x08, + REG_TX_MSB = 0x0a, + REG_RX_LSB = 0x0c, + REG_RX_MSB = 0x0e, +}; + +#define SPI_SET1_EN_CLK (1 << 0) +#define SPI_SET1_WR_IRQ_DIS (1 << 4) +#define SPI_SET1_RDWR_IRQ_DIS (1 << 5) + +#define SPI_CTRL_RDWR (1 << 0) +#define SPI_CTRL_WR (1 << 1) +#define SPI_CTRL_NB_SHIFT 2 +#define SPI_CTRL_AD_SHIFT 7 + +#define SPI_STATUS_RE (1 << 0) /* Read End */ +#define SPI_STATUS_WE (1 << 1) /* Write End */ + +#endif /* ___ARCH_ARM_SRC_CALYPSO_CALYPSO_SPI_H */ |