mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-23 16:37:34 +08:00
nxphlite-v3:use px4_micro_hal PX4_BUS_NUMBER_{TO|FROM}_PX4 mapping
This commit is contained in:
committed by
Daniel Agar
parent
64b9f687c0
commit
8ac43c9988
@@ -212,9 +212,9 @@ __BEGIN_DECLS
|
||||
|
||||
/* SPI Bus assignments */
|
||||
|
||||
#define PX4_SPI_BUS_MEMORY 0
|
||||
#define PX4_SPI_BUS_SENSORS 1
|
||||
#define PX4_SPI_BUS_EXTERNAL 2
|
||||
#define PX4_SPI_BUS_MEMORY PX4_BUS_NUMBER_TO_PX4(0)
|
||||
#define PX4_SPI_BUS_SENSORS PX4_BUS_NUMBER_TO_PX4(1)
|
||||
#define PX4_SPI_BUS_EXTERNAL PX4_BUS_NUMBER_TO_PX4(2)
|
||||
#define PX4_SPI_BUS_RAMTRON PX4_SPI_BUS_MEMORY
|
||||
#define PX4_SPI_BUS_EXT PX4_SPI_BUS_EXTERNAL
|
||||
|
||||
@@ -273,8 +273,8 @@ __BEGIN_DECLS
|
||||
|
||||
#define GPIO_P_INT (GPIO_PULLUP | PIN_PORTD | PIN11)
|
||||
|
||||
#define PX4_I2C_BUS_EXPANSION 0
|
||||
#define PX4_I2C_BUS_ONBOARD 1
|
||||
#define PX4_I2C_BUS_EXPANSION PX4_BUS_NUMBER_TO_PX4(0)
|
||||
#define PX4_I2C_BUS_ONBOARD PX4_BUS_NUMBER_TO_PX4(1)
|
||||
|
||||
#define PX4_I2C_BUS_LED PX4_I2C_BUS_EXPANSION
|
||||
|
||||
|
||||
@@ -153,7 +153,7 @@ __EXPORT int nxphlite_spi_bus_initialize(void)
|
||||
{
|
||||
/* Configure SPI-based devices */
|
||||
|
||||
spi_sensors = kinetis_spibus_initialize(PX4_SPI_BUS_SENSORS);
|
||||
spi_sensors = px4_spibus_initialize(PX4_SPI_BUS_SENSORS);
|
||||
|
||||
if (!spi_sensors) {
|
||||
message("[boot] FAILED to initialize SPI port %d\n", PX4_SPI_BUS_SENSORS);
|
||||
@@ -173,7 +173,7 @@ __EXPORT int nxphlite_spi_bus_initialize(void)
|
||||
|
||||
/* Get the SPI port for the Memory */
|
||||
|
||||
spi_memory = kinetis_spibus_initialize(PX4_SPI_BUS_MEMORY);
|
||||
spi_memory = px4_spibus_initialize(PX4_SPI_BUS_MEMORY);
|
||||
|
||||
if (!spi_memory) {
|
||||
message("[boot] FAILED to initialize SPI port %d\n", PX4_SPI_BUS_MEMORY);
|
||||
@@ -193,7 +193,7 @@ __EXPORT int nxphlite_spi_bus_initialize(void)
|
||||
|
||||
/* Configure EXTERNAL SPI-based devices */
|
||||
|
||||
spi_ext = kinetis_spibus_initialize(PX4_SPI_BUS_EXTERNAL);
|
||||
spi_ext = px4_spibus_initialize(PX4_SPI_BUS_EXTERNAL);
|
||||
|
||||
if (!spi_ext) {
|
||||
message("[boot] FAILED to initialize SPI port %d\n", PX4_SPI_BUS_EXTERNAL);
|
||||
|
||||
Reference in New Issue
Block a user