Added DroneCAN SocketCAN driver Skeleton

This commit is contained in:
Peter van der Perk
2022-07-15 17:22:31 +02:00
committed by Daniel Agar
parent 14df1ee917
commit 47aaa38d5f
17 changed files with 910 additions and 8 deletions
@@ -40,3 +40,4 @@ add_subdirectory(../s32k1xx/hrt hrt)
add_subdirectory(../s32k1xx/io_pins io_pins)
add_subdirectory(../s32k1xx/tone_alarm tone_alarm)
add_subdirectory(../s32k1xx/version version)
add_subdirectory(../s32k1xx/watchdog watchdog)
@@ -39,6 +39,7 @@
*/
#include <px4_platform_common/px4_config.h>
#include <systemlib/px4_macros.h>
#include <errno.h>
#include <nuttx/board.h>
#include <hardware/s32k1xx_rcm.h>
@@ -53,6 +54,26 @@ static int board_reset_enter_bootloader()
return OK;
}
static const uint32_t modes[] = {
/* to tb */
/* BOARD_RESET_MODE_CLEAR 5 y */ 0,
/* BOARD_RESET_MODE_BOOT_TO_BL 0 n */ 0xb007b007,
/* BOARD_RESET_MODE_BOOT_TO_VALID_APP 0 y */ 0xb0070002,
/* BOARD_RESET_MODE_CAN_BL 10 n */ 0xb0080000,
/* BOARD_RESET_MODE_RTC_BOOT_FWOK 0 n */ 0xb0093a26
};
int board_configure_reset(reset_mode_e mode, uint32_t arg)
{
int rv = -1;
if (mode < arraySize(modes)) {
//FIXME implemented this
}
return rv;
}
/****************************************************************************
* Name: board_reset
*