px4_micro_hal:Define PX4_SOC_ARCH_ID

This commit is contained in:
David Sidrane
2017-09-07 08:24:36 -10:00
committed by Beat Küng
parent e73c50ad9c
commit 8bec5fc37b
+13
View File
@@ -47,6 +47,14 @@ __BEGIN_DECLS
* schemes or 0,1,2 for zero based schemes.
*/
/* PX4_SOC_ARCH_ID is monotonic ordinal number assigned by PX4 to a chip
* architecture. The 2 bytes are used to create a globally unique ID when
* prepended to a padded Soc ID.
*/
#define PX4_SOC_ARCH_ID_BASE 0x0001
#define PX4_MK_SOC_ARCH_ID(a) ((a)+PX4_SOC_ARCH_ID_BASE)
#define PX4_BUS_NUMBER_TO_PX4(x) ((x)+PX4_BUS_OFFSET) /* Use to define Zero based to match Nuttx Driver but provide 1 based to PX4 */
#define PX4_BUS_NUMBER_FROM_PX4(x) ((x)-PX4_BUS_OFFSET) /* Use to map PX4 1 based to NuttX driver 0 based */
@@ -57,6 +65,7 @@ __BEGIN_DECLS
# if defined(CONFIG_ARCH_CHIP_STM32)
# include <stm32.h>
# define PX4_SOC_ARCH_ID PX4_MK_SOC_ARCH_ID(0)
# define PX4_FLASH_BASE STM32_FLASH_BASE
# if defined(CONFIG_STM32_STM32F4XXX)
# include <stm32_bbsram.h>
@@ -67,6 +76,7 @@ __BEGIN_DECLS
# endif
# if defined(CONFIG_ARCH_CHIP_STM32F7)
# define PX4_SOC_ARCH_ID PX4_MK_SOC_ARCH_ID(1)
# include <chip.h>
# include <up_internal.h> //include up_systemreset() which is included on stm32.h
# include <stm32_bbsram.h>
@@ -144,6 +154,7 @@ __BEGIN_DECLS
#endif // defined(CONFIG_ARCH_CHIP_STM32) || defined(CONFIG_ARCH_CHIP_STM32F7)
#if defined(CONFIG_ARCH_CHIP_KINETIS)
# define PX4_SOC_ARCH_ID PX4_MK_SOC_ARCH_ID(2)
# // Fixme: using ??
# define PX4_BBSRAM_SIZE 2048
@@ -217,6 +228,8 @@ __BEGIN_DECLS
# include <sam_spi.h>
# include <sam_twihs.h>
# define PX4_SOC_ARCH_ID PX4_MK_SOC_ARCH_ID(3)
# // Fixme: using ??
# define PX4_BBSRAM_SIZE 2048
# define PX4_BBSRAM_GETDESC_IOCTL 0