Browse Source

boards/sky-drones: update to extended hw_ver_rev format

main
Igor Mišić 3 years ago committed by Beat Küng
parent
commit
f7d542e720
  1. 4
      boards/sky-drones/smartap-airlink/src/board_config.h
  2. 4
      boards/sky-drones/smartap-airlink/src/manifest.c
  3. 4
      boards/sky-drones/smartap-airlink/src/mtd.cpp

4
boards/sky-drones/smartap-airlink/src/board_config.h

@ -173,9 +173,7 @@ @@ -173,9 +173,7 @@
#define GPIO_HW_VER_REV_DRIVE /* PG0 */ (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_SET|GPIO_PORTG|GPIO_PIN0)
#define GPIO_HW_REV_SENSE /* PF5 */ ADC3_GPIO(15)
#define GPIO_HW_VER_SENSE /* PF4 */ ADC3_GPIO(14)
#define HW_INFO_INIT {'V','5','X','x', 'x',0}
#define HW_INFO_INIT_VER 3 /* Offset in above string of the VER */
#define HW_INFO_INIT_REV 4 /* Offset in above string of the REV */
#define HW_INFO_INIT "V5X%04x%04x"
/* HEATER
* PWM in future

4
boards/sky-drones/smartap-airlink/src/manifest.c

@ -112,7 +112,7 @@ __EXPORT px4_hw_mft_item board_query_manifest(px4_hw_mft_item_id_t id) @@ -112,7 +112,7 @@ __EXPORT px4_hw_mft_item board_query_manifest(px4_hw_mft_item_id_t id)
static px4_hw_mft_list_entry boards_manifest = px4_hw_mft_list_uninitialized;
if (boards_manifest == px4_hw_mft_list_uninitialized) {
uint32_t ver_rev = board_get_hw_version() << 8;
uint32_t ver_rev = board_get_hw_version() << 16;
ver_rev |= board_get_hw_revision();
for (unsigned i = 0; i < arraySize(mft_lists); i++) {
@ -123,7 +123,7 @@ __EXPORT px4_hw_mft_item board_query_manifest(px4_hw_mft_item_id_t id) @@ -123,7 +123,7 @@ __EXPORT px4_hw_mft_item board_query_manifest(px4_hw_mft_item_id_t id)
}
if (boards_manifest == px4_hw_mft_list_uninitialized) {
syslog(LOG_ERR, "[boot] Board %4" PRIx32 " is not supported!\n", ver_rev);
syslog(LOG_ERR, "[boot] Board %08" PRIx32 " is not supported!\n", ver_rev);
}
}

4
boards/sky-drones/smartap-airlink/src/mtd.cpp

@ -95,7 +95,9 @@ static const px4_mft_entry_s mtd_mft = { @@ -95,7 +95,9 @@ static const px4_mft_entry_s mtd_mft = {
static const px4_mft_s mft = {
.nmft = 1,
.mfts = &mtd_mft
.mfts = {
&mtd_mft
}
};
const px4_mft_s *board_get_manifest(void)

Loading…
Cancel
Save