Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
Firmware
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Alberto Ruiz Garcia
Firmware
Commits
dc59e19b
Commit
dc59e19b
authored
7 years ago
by
David Sidrane
Committed by
Beat Küng
6 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Moved PX4_SOC_ARCH_ID from px4_micro_hal to board_common
parent
695a7f68
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/drivers/boards/common/board_common.h
+23
-0
23 additions, 0 deletions
src/drivers/boards/common/board_common.h
src/platforms/px4_micro_hal.h
+13
-21
13 additions, 21 deletions
src/platforms/px4_micro_hal.h
with
36 additions
and
21 deletions
src/drivers/boards/common/board_common.h
+
23
−
0
View file @
dc59e19b
...
...
@@ -321,6 +321,29 @@ typedef enum board_power_button_state_notification_e {
typedef
int
(
*
power_button_state_notification_t
)(
board_power_button_state_notification_e
request
);
/* 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.
*/
typedef
enum
PX4_SOC_ARCH_ID_t
{
PX4_SOC_ARCH_ID_STM32F4
=
0x0001
,
PX4_SOC_ARCH_ID_STM32F7
=
0x0002
,
PX4_SOC_ARCH_ID_KINETISK66
=
0x0003
,
PX4_SOC_ARCH_ID_SAMV7
=
0x0004
,
PX4_SOC_ARCH_ID_EAGLE
=
0x1001
,
PX4_SOC_ARCH_ID_QURT
=
0x1002
,
PX4_SOC_ARCH_ID_OCPOC
=
0x1003
,
PX4_SOC_ARCH_ID_RPI
=
0x1004
,
PX4_SOC_ARCH_ID_SIM
=
0x1005
,
PX4_SOC_ARCH_ID_SITL
=
0x1006
,
}
PX4_SOC_ARCH_ID_t
;
/* UUID
*
* Define the types used for board UUID, MFG UID and PX4 GUID
...
...
This diff is collapsed.
Click to expand it.
src/platforms/px4_micro_hal.h
+
13
−
21
View file @
dc59e19b
...
...
@@ -32,7 +32,7 @@
****************************************************************************/
#pragma once
/*
* This file is a shim to bridge to
nuttx_v
3
* This file is a shim to bridge to
the many SoC architecture supported by PX
3
*/
#ifdef __PX4_NUTTX
...
...
@@ -47,14 +47,6 @@ __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 */
...
...
@@ -65,7 +57,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_SOC_ARCH_ID PX4_SOC_ARCH_ID
_STM32F4
# define PX4_FLASH_BASE STM32_FLASH_BASE
# if defined(CONFIG_STM32_STM32F4XXX)
# include <stm32_bbsram.h>
...
...
@@ -76,7 +68,7 @@ __BEGIN_DECLS
# endif
# if defined(CONFIG_ARCH_CHIP_STM32F7)
# define PX4_SOC_ARCH_ID PX4_
MK_
SOC_ARCH_ID
(1)
# define PX4_SOC_ARCH_ID PX4_SOC_ARCH_ID
_STM32F7
# include <chip.h>
# include <up_internal.h> //include up_systemreset() which is included on stm32.h
# include <stm32_bbsram.h>
...
...
@@ -154,15 +146,15 @@ __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)
# define PX4_SOC_ARCH_ID PX4_SOC_ARCH_ID
_KINETISK66
# // Fixme: using ??
# define PX4_BBSRAM_SIZE 2048
# define PX4_BBSRAM_GETDESC_IOCTL 0
# define PX4_NUMBER_I2C_BUSES KINETIS_NI2C
# define PX4_BBSRAM_SIZE
2048
# define PX4_BBSRAM_GETDESC_IOCTL
0
# define PX4_NUMBER_I2C_BUSES
KINETIS_NI2C
# define GPIO_OUTPUT_SET GPIO_OUTPUT_ONE
# define GPIO_OUTPUT_CLEAR GPIO_OUTPUT_ZER0
# define GPIO_OUTPUT_SET
GPIO_OUTPUT_ONE
# define GPIO_OUTPUT_CLEAR
GPIO_OUTPUT_ZER0
# include <chip.h>
# include <kinetis_spi.h>
...
...
@@ -228,12 +220,12 @@ __BEGIN_DECLS
# include <sam_spi.h>
# include <sam_twihs.h>
# define PX4_SOC_ARCH_ID PX4_
MK_
SOC_ARCH_ID
(3)
# define PX4_SOC_ARCH_ID PX4_SOC_ARCH_ID
_SAMV7
# // Fixme: using ??
# define PX4_BBSRAM_SIZE 2048
# define PX4_BBSRAM_GETDESC_IOCTL 0
# define PX4_NUMBER_I2C_BUSES SAMV7_NTWIHS
# define PX4_BBSRAM_SIZE
2048
# define PX4_BBSRAM_GETDESC_IOCTL
0
# define PX4_NUMBER_I2C_BUSES
SAMV7_NTWIHS
//todo:define this for Atmel and add loader.
/* Atmel defines the 128 bit UUID as
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment