Skip to content
Snippets Groups Projects
Commit 442f79da authored by David Sidrane's avatar David Sidrane Committed by Daniel Agar
Browse files

same70xplained-v1:use px4_micro_hal PX4_BUS_NUMBER_{TO|FROM}_PX4 mapping

parent 5d33b602
No related branches found
No related tags found
No related merge requests found
......@@ -198,7 +198,7 @@ __BEGIN_DECLS
#define GPIO_SPI_CS_BARO (GPIO_OUTPUT | GPIO_CFG_DEFAULT | GPIO_OUTPUT_SET | GPIO_PORT_PIOD | GPIO_PIN11)
#define GPIO_SPI_CS_MPU (GPIO_OUTPUT | GPIO_CFG_DEFAULT | GPIO_OUTPUT_SET | GPIO_PORT_PIOD | GPIO_PIN27)
#define PX4_SPI_BUS_SENSORS 1
#define PX4_SPI_BUS_SENSORS PX4_BUS_NUMBER_TO_PX4(0)
#define PX4_SPI_BUS_BARO PX4_SPI_BUS_SENSORS
/* Use these in place of the spi_dev_e enumeration to select a specific SPI device on SPI1 */
......@@ -209,9 +209,9 @@ __BEGIN_DECLS
/* I2C busses */
#define PX4_I2C_BUS_EXPANSION 1
#define PX4_I2C_BUS_EXPANSION PX4_BUS_NUMBER_TO_PX4(0)
/* No Onboard Sensors #define PX4_I2C_BUS_ONBOARD 0 */
#define PX4_I2C_BUS_LED 1
#define PX4_I2C_BUS_LED PX4_I2C_BUS_EXPANSION
/* Devices on the onboard bus.
*
......
......@@ -278,10 +278,10 @@ __EXPORT int board_app_initialize(uintptr_t arg)
/* Configure SPI-based devices */
spi0 = sam_spibus_initialize(0);
spi0 = px4_spibus_initialize(PX4_SPI_BUS_SENSORS);
if (!spi0) {
message("[boot] FAILED to initialize SPI port 0\n");
message("[boot] FAILED to initialize SPI port %d\n", PX4_SPI_BUS_SENSORS);
board_autoled_on(LED_AMBER);
return -ENODEV;
}
......@@ -297,7 +297,7 @@ __EXPORT int board_app_initialize(uintptr_t arg)
up_udelay(20);
#if defined(CONFIG_SAMV7_SPI1_MASTER)
spi1 = sam_spibus_initialize(1);
spi1 = px4_spibus_initialize(PX4_SPI_BUS_MEMORY);
/* Default SPI4 to 1MHz and de-assert the known chip selects. */
SPI_SETFREQUENCY(spi1, 10000000);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment