From ab86d8cf9be2a41e92b814c0f1055001ddc32bc1 Mon Sep 17 00:00:00 2001 From: Tim Sweet Date: Sun, 17 Jun 2018 15:33:39 -0700 Subject: [PATCH] removing drm from 107_odin branch. saved in odin_drm branch --- make.py | 2 -- src/drm/drm.c | 84 --------------------------------------------- src/drm/drm.h | 5 --- src/imu/main.c | 3 -- src/imu/scheduler.c | 5 --- 5 files changed, 99 deletions(-) delete mode 100644 src/drm/drm.c delete mode 100644 src/drm/drm.h diff --git a/make.py b/make.py index 68b584ec..8382c02d 100755 --- a/make.py +++ b/make.py @@ -189,7 +189,6 @@ def configure_target(TARGET): os.path.join("src", "imu"), os.path.join("src", "bootloader"), os.path.join("src", "filter"), - os.path.join("src", "drm"), LIBRARY_PATH + "/CMSIS_std/Device/ST/STM32F30x/Include", LIBRARY_PATH + "/STM32F30x_StdPeriph_Driver/inc", LIBRARY_PATH + "/CMSIS_std/Include" @@ -200,7 +199,6 @@ def configure_target(TARGET): os.path.join("src", "stm32"), os.path.join("src", "target"), os.path.join("src", "board_comm"), - os.path.join("src", "drm"), LIBRARY_PATH + "/CMSIS_std/Device/ST/STM32F30x/Source", LIBRARY_PATH + "/STM32F30x_StdPeriph_Driver/src" ] diff --git a/src/drm/drm.c b/src/drm/drm.c deleted file mode 100644 index 42ae6a66..00000000 --- a/src/drm/drm.c +++ /dev/null @@ -1,84 +0,0 @@ -#include "includes.h" -#include "drm.h" - -#define CHECK_ARRAY_SIZE 4 - -#define CHECKL1 *(uint32_t *)0x20000010 -#define CHECK1 0x00C001D0 -#define CHECKL2 *(uint32_t *)0x20000014 -#define CHECK2 0x00000086 -#define CHECKL3 *(uint32_t *)0x20000018 -#define CHECK3 0x000000B2 -#define CHECKL4 *(uint32_t *)0x2000001C -#define CHECK4 0x00000070 - -volatile uint32_t checkArray[CHECK_ARRAY_SIZE]; - -void prerun_check(void) -{ - -#ifdef C3PUBL - return; //don't do this on bl -#endif - - checkArray[0] = CHECKL1; - checkArray[1] = CHECKL2; - checkArray[2] = CHECKL3; - checkArray[3] = CHECKL4; - - /* - if(CHECKL1 != CHECK1) - while(1); - if(CHECKL2 != CHECK2) - while(1); - if(CHECKL3 != CHECK3) - while(1); - if(CHECKL4 != CHECK4) - while(1); - if(CHECKL5 != CHECK5) - while(1); - if(CHECKL6 != CHECK6) - while(1); - if(CHECKL7 != CHECK7) - while(1); - if(CHECKL8 != CHECK8) - while(1); - */ -} - - -int check_me(void) -{ - - static int counter = 0; - switch(counter) - { - case 0: - if(checkArray[counter++] != CHECK1) { - return 0; - } - break; - case 1: - if(checkArray[counter++] != CHECK2) { - return 0; - } - break; - case 2: - if(checkArray[counter++] != CHECK3) { - return 0; - } - break; - case 3: - if(checkArray[counter++] != CHECK4) { - return 0; - } - counter = 0; - break; - case 8: - default: - counter = 0; - - } - return 1; - -} \ No newline at end of file diff --git a/src/drm/drm.h b/src/drm/drm.h deleted file mode 100644 index b7c4e08b..00000000 --- a/src/drm/drm.h +++ /dev/null @@ -1,5 +0,0 @@ -#pragma once -#include "includes.h" - -void prerun_check(void); -int check_me(void); \ No newline at end of file diff --git a/src/imu/main.c b/src/imu/main.c index 2929e3c6..1bc29ef4 100644 --- a/src/imu/main.c +++ b/src/imu/main.c @@ -5,7 +5,6 @@ #include "gyro.h" #include "filter.h" #include "crc.h" -#include "drm.h" #include "scheduler.h" @@ -22,8 +21,6 @@ int main(void) init_imu(); //this makes the status light go red single_gpio_init(BOOTLOADER_CHECK_PORT, BOOTLOADER_CHECK_PIN_SRC, BOOTLOADER_CHECK_PIN, 0, GPIO_Mode_OUT, GPIO_OType_PP, GPIO_PuPd_NOPULL); - //init drm - prerun_check(); //init gyro gyro_init(); diff --git a/src/imu/scheduler.c b/src/imu/scheduler.c index 120c680d..b855ccfa 100644 --- a/src/imu/scheduler.c +++ b/src/imu/scheduler.c @@ -4,7 +4,6 @@ #include "quaternions.h" #include "gyro.h" #include "filter.h" -#include "drm.h" #include "gyro_device.h" //where gyroRxFrame lives inline void scheduler_run(void) @@ -27,8 +26,4 @@ inline void scheduler_run(void) update_quaternions(); gyroDataReadDone = 0; //reset read flag to prepare for next read fire_spi_send_ready(); - if (!check_me()) - { - delay_ms(42); - } } \ No newline at end of file