From d9c3fba928162e7a89349f8b160eb479ad41cbea Mon Sep 17 00:00:00 2001 From: Nathaniel Graff Date: Thu, 7 Mar 2019 09:29:05 -0800 Subject: Remove legacy examples Signed-off-by: Nathaniel Graff --- software/i2c_demo/.gitignore | 1 - software/i2c_demo/Makefile | 6 - software/i2c_demo/i2c_demo.c | 318 ------------------------------------------- 3 files changed, 325 deletions(-) delete mode 100644 software/i2c_demo/.gitignore delete mode 100644 software/i2c_demo/Makefile delete mode 100644 software/i2c_demo/i2c_demo.c (limited to 'software/i2c_demo') diff --git a/software/i2c_demo/.gitignore b/software/i2c_demo/.gitignore deleted file mode 100644 index 7a8011b..0000000 --- a/software/i2c_demo/.gitignore +++ /dev/null @@ -1 +0,0 @@ -i2c_demo diff --git a/software/i2c_demo/Makefile b/software/i2c_demo/Makefile deleted file mode 100644 index ef29ef2..0000000 --- a/software/i2c_demo/Makefile +++ /dev/null @@ -1,6 +0,0 @@ -TARGET = i2c_demo -C_SRCS += i2c_demo.c -CFLAGS += -O2 -fno-builtin-printf - -BSP_BASE = ../../bsp -include $(BSP_BASE)/env/common.mk diff --git a/software/i2c_demo/i2c_demo.c b/software/i2c_demo/i2c_demo.c deleted file mode 100644 index 4011c09..0000000 --- a/software/i2c_demo/i2c_demo.c +++ /dev/null @@ -1,318 +0,0 @@ -#include -#include -#include "platform.h" -#include -#include -#include -#include "stdatomic.h" - -#define MPU6050_ADDR 0x68 - -#define MPU6050_RA_ACCEL_XOUT_H 0x3B -#define MPU6050_RA_ACCEL_XOUT_L 0x3C -#define MPU6050_RA_ACCEL_YOUT_H 0x3D -#define MPU6050_RA_ACCEL_YOUT_L 0x3E -#define MPU6050_RA_ACCEL_ZOUT_H 0x3F -#define MPU6050_RA_ACCEL_ZOUT_L 0x40 -#define MPU6050_RA_TEMP_OUT_H 0x41 -#define MPU6050_RA_TEMP_OUT_L 0x42 -#define MPU6050_RA_GYRO_XOUT_H 0x43 -#define MPU6050_RA_GYRO_XOUT_L 0x44 -#define MPU6050_RA_GYRO_YOUT_H 0x45 -#define MPU6050_RA_GYRO_YOUT_L 0x46 -#define MPU6050_RA_GYRO_ZOUT_H 0x47 -#define MPU6050_RA_GYRO_ZOUT_L 0x48 -#define MPU6050_RA_PWR_MGMT_1 0x6B -#define MPU6050_RA_WHO_AM_I 0x75 - -#define SDA PIN_8_OFFSET -#define SCL PIN_9_OFFSET - -#define LONG 25 // Equals ~400KHz -#define SHORT 5 - -//busy wait for the specified time -void wait_ms(uint64_t ms) { - static const uint64_t ms_tick = RTC_FREQ/1000; - volatile uint64_t * mtime = (uint64_t*) (CLINT_CTRL_ADDR + CLINT_MTIME); - uint64_t then = (ms_tick * ms) + *mtime; - while(*mtime