Commit 357a3f0a authored by schneider's avatar schneider

Merge branch 'schneider/sdk-0.2.1-12' into 'master'

Update SDK to 0.2.1-12

See merge request card10/firmware!397
parents 64ea6680 4f1f5d0a

Too many changes to show.

To preserve performance only 1000 of 1000+ files are displayed.
build/
/build/
/Documentation/output/
__pycache__/
*.pyc
......
......@@ -71,12 +71,6 @@ extern void bleFileTransfer_init(void);
extern void bleCard10_init(void);
extern void BbBleDrvSetTxPower(int8_t power);
/*************************************************************************************************/
void PalSysAssertTrap(void)
{
while (1) {
}
}
/*************************************************************************************************/
static bool_t myTrace(const uint8_t *pBuf, uint32_t len)
{
......
......@@ -84,13 +84,8 @@ int hardware_early_init(void)
PB_Init();
/* Enable 32 kHz output */
while (RTC_SquareWave(
MXC_RTC,
SQUARE_WAVE_ENABLED,
F_32KHZ,
NOISE_IMMUNE_MODE,
NULL) == E_BUSY
)
while (RTC_SquareWave(MXC_RTC, SQUARE_WAVE_ENABLED, F_32KHZ, NULL) ==
E_BUSY)
;
/* If we don't have a valid time yet, set it to 2019-01-01 */
......@@ -101,12 +96,11 @@ int hardware_early_init(void)
/*
* SPI for ECG
*/
const sys_cfg_spi_t spi17y_master_cfg = {
.map = MAP_A,
.ss0 = Enable,
.ss1 = Disable,
.ss2 = Disable,
};
const sys_cfg_spi_t spi17y_master_cfg = { .map = MAP_A,
.ss0 = Enable,
.ss1 = Disable,
.ss2 = Disable,
.num_io = 2 };
if (SPI_Init(SPI0, 0, SPI_SPEED, spi17y_master_cfg) != 0) {
LOG_ERR("init", "Error configuring SPI");
......
......@@ -8,6 +8,8 @@
#include "max86150.h"
#include "MAX77650-Arduino-Library.h"
#include "bb_drv.h"
#include "max32665.h"
#include "mxc_sys.h"
#include "mxc_pins.h"
......@@ -188,6 +190,7 @@ void sleep_deepsleep(void)
core1_stop();
MAX77650_getINT_GLBL();
gpio_low_power();
BbDrvDisable();
turnOffClocks();
old_clkcn = MXC_GCR->clkcn;
switchToHIRC();
......
......@@ -60,13 +60,8 @@ void card10_init(void)
TMR_Delay(MXC_TMR0, MSEC(1000), 0);
// Enable 32 kHz output
while (RTC_SquareWave(
MXC_RTC,
SQUARE_WAVE_ENABLED,
F_32KHZ,
NOISE_IMMUNE_MODE,
NULL) == E_BUSY
)
while (RTC_SquareWave(MXC_RTC, SQUARE_WAVE_ENABLED, F_32KHZ, NULL) ==
E_BUSY)
;
/* If we don't have a valid time yet, set it to 2019-01-01 */
if (RTC_GetSecond() < 1546300800L) {
......@@ -80,10 +75,11 @@ void card10_init(void)
// Enable SPI
sys_cfg_spi_t spi17y_master_cfg;
spi17y_master_cfg.map = MAP_A;
spi17y_master_cfg.ss0 = Enable;
spi17y_master_cfg.ss1 = Disable;
spi17y_master_cfg.ss2 = Disable;
spi17y_master_cfg.map = MAP_A;
spi17y_master_cfg.ss0 = Enable;
spi17y_master_cfg.ss1 = Disable;
spi17y_master_cfg.ss2 = Disable;
spi17y_master_cfg.num_io = 2;
if (SPI_Init(SPI0, 0, SPI_SPEED, spi17y_master_cfg) != 0) {
printf("Error configuring SPI\n");
while (1)
......
......@@ -51,10 +51,11 @@ void lcd_write(uint8_t *data, int size)
{
sys_cfg_spi_t spi17y_master_cfg;
spi17y_master_cfg.map = MAP_A;
spi17y_master_cfg.ss0 = Enable;
spi17y_master_cfg.ss1 = Disable;
spi17y_master_cfg.ss2 = Disable;
spi17y_master_cfg.map = MAP_A;
spi17y_master_cfg.ss0 = Enable;
spi17y_master_cfg.ss1 = Disable;
spi17y_master_cfg.ss2 = Disable;
spi17y_master_cfg.num_io = 2;
if (SPI_Init(SPI2, 0, SPI_SPEED, spi17y_master_cfg) != 0) {
printf("Error configuring SPI\n");
while (1)
......
......@@ -188,6 +188,26 @@ $(error SDMA currently requires BTLE_APP_USE_LEGACY_API)
endif
endif
ifdef ENABLE_SDMA_UNIFIED_CONFIG
ifneq "$(ENABLE_SDMA_UNIFIED_CONFIG)" ""
ifeq "$(ENABLE_SDMA_UNIFIED_CONFIG)" "0"
ENABLE_SDMA_UNIFIED_CONFIG=
else
ifeq "$(ENABLE_SDMA_UNIFIED_CONFIG)" "FALSE"
ENABLE_SDMA_UNIFIED_CONFIG=
else
ENABLE_SDMA_UNIFIED_CONFIG=1
endif
endif
endif
endif
ifdef ENABLE_SDMA_UNIFIED_CONFIG
ifneq "$(ENABLE_SDMA_UNIFIED_CONFIG)" "0"
PROJ_CFLAGS+=-DENABLE_SDMA_UNIFIED_CONFIG=1
endif