Compare commits

...

13 Commits

Author SHA1 Message Date
rusefillc 286bab0eed fresh 2023-05-24 01:06:35 -04:00
rusefillc a55d358247 progress 2023-05-24 01:06:21 -04:00
rusefillc 70bc09dff3 progress 2023-05-23 23:44:41 -04:00
rusefillc c9887d6966 fresh 2023-05-23 23:44:23 -04:00
rusefillc b6b83ca148 fresh 2023-05-23 23:27:54 -04:00
rusefillc a01d8caf87 driver progress 2023-05-23 23:27:40 -04:00
rusefillc 0e6a830a30 fresh 2023-05-23 23:14:07 -04:00
rusefillc f37433ed85 driver progress 2023-05-23 23:13:37 -04:00
rusefillc 13da43726a fresh 2023-05-23 23:01:18 -04:00
rusefillc 4d88e08b98 changing submodule 2023-05-23 22:53:37 -04:00
rusefillc b57022b223 driver progress 2023-05-23 22:51:28 -04:00
rusefillc 8ccb085343 changing submodule 2023-05-23 22:25:17 -04:00
rusefillc b32d976d30 changing submodule 2023-05-23 21:39:12 -04:00
11 changed files with 131 additions and 6 deletions

4
.gitmodules vendored
View File

@ -1,6 +1,8 @@
[submodule "ext/AT32F435_437_Firmware_Library"]
path = ext/AT32F435_437_Firmware_Library
url = http://github.com/ArteryTek/AT32F435_437_Firmware_Library/
url = http://github.com/rusefi/AT32F435_437_Firmware_Library/
branch = rusefi_prod
[submodule "ext/rusefi"]
path = ext/rusefi
url = http://github.com/rusefi/rusefi
branch = at32

View File

@ -0,0 +1,12 @@
#ifndef HAL_LLD_H_
#define HAL_LLD_H_
#ifdef __cplusplus
extern "C" {
#endif
void hal_lld_init(void);
#ifdef __cplusplus
}
#endif
#endif /* HAL_LLD_H_ */

View File

@ -0,0 +1,65 @@
/**
* @brief Width, in bits, of an I/O port.
*/
#define PAL_IOPORTS_WIDTH 16
/**
* @name Line handling macros
* @{
*/
/**
* @brief Forms a line identifier.
* @details A port/pad pair are encoded into an @p ioline_t type. The encoding
* of this type is platform-dependent.
* @note In this driver the pad number is encoded in the lower 4 bits of
* the GPIO address which are guaranteed to be zero.
*/
#define PAL_LINE(port, pad) \
((ioline_t)((uint32_t)(port)) | ((uint32_t)(pad)))
/* Specifies palInit() without parameter, required until all platforms will
be updated to the new style.*/
#define PAL_NEW_INIT
/**
* @brief Digital I/O port sized unsigned type.
*/
typedef uint32_t ioportmask_t;
/**
* @brief Digital I/O modes.
*/
typedef uint32_t iomode_t;
/**
* @brief Type of an I/O line.
*/
typedef uint32_t ioline_t;
/**
* @brief Type of an event mode.
*/
typedef uint32_t ioeventmode_t;
typedef gpio_type *ioportid_t;
/**
* @brief Type of an pad identifier.
*/
typedef uint32_t iopadid_t;
#define pal_lld_init(config) _pal_lld_init(config)
#ifdef __cplusplus
extern "C" {
#endif
void _pal_lld_init(void);
#ifdef __cplusplus
}
#endif
//typedef struct {
//} PALConfig;
//extern const PALConfig pal_default_config;

View File

@ -0,0 +1,14 @@
#ifndef HAL_ST_LLD_H_
#define HAL_ST_LLD_H_
#include "mcuconf.h"
#ifdef __cplusplus
extern "C" {
#endif
void st_lld_init(void);
#ifdef __cplusplus
}
#endif
#endif /* HAL_ST_LLD_H_ */

View File

@ -0,0 +1,11 @@
#pragma once
#define US_TO_NT_MULTIPLIER (CORE_CLOCK / 1000000)
// todo: huh? is this universal?
typedef enum {
BOR_Level_None = 0,
BOR_Level_1 = 1,
BOR_Level_2 = 2,
BOR_Level_3 = 3
} BOR_Level_t;

View File

@ -6,4 +6,8 @@
*/
#define BOARD_NAME "AT-EVAL"
#ifndef LED_CRITICAL_ERROR_BRAIN_PIN
#define LED_CRITICAL_ERROR_BRAIN_PIN Gpio::Unassigned
#endif
#endif /* _BOARD_H_ */

View File

@ -1 +1,6 @@
ARTERY_CONTRIB = $(BOARD_DIR)/OS
ARTERY_CONTRIB = $(BOARD_DIR)/OS
USE_LIS302 = no
USE_FATFS = no
LDSCRIPT = $(ARTERY_CONTRIB)/../ext/AT32F435_437_Firmware_Library/libraries/cmsis/cm4/device_support/startup/gcc/linker/AT32F435xG_FLASH.ld

View File

@ -0,0 +1,12 @@
#pragma once
#define EFI_GPIO_HARDWARE TRUE
// todo: we really need GPT implementation
// todo: #define EFI_SIGNAL_EXECUTOR_ONE_TIMER TRUE
#define EFI_SIGNAL_EXECUTOR_SLEEP TRUE
#define MY_US2ST(x) ((x) / 10)
#define CONSOLE_MAX_ACTIONS 180
#define ENABLE_PERF_TRACE FALSE

@ -1 +1 @@
Subproject commit d0461efdb71408f89cdacb1f361c00a51b2a234b
Subproject commit 789d2b2955fa6c3d93560e5651d8bad8aaf5e503

@ -1 +1 @@
Subproject commit d5a959d9544acb2d8987179059cf1d6e54f2a167
Subproject commit 2b46656c125b7e83bf0849733fb8e1f66cfaf1da

View File

@ -100,7 +100,7 @@
* @brief Enables the SPI subsystem.
*/
#if !defined(HAL_USE_SPI) || defined(__DOXYGEN__)
#define HAL_USE_SPI TRUE
#define HAL_USE_SPI FALSE
#endif
/**
@ -134,7 +134,7 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(PAL_USE_WAIT) || defined(__DOXYGEN__)
#define PAL_USE_WAIT TRUE
#define PAL_USE_WAIT FALSE
#endif
/*===========================================================================*/