Poking I2C
This commit is contained in:
@@ -9,7 +9,10 @@
|
||||
#include "Debug.h"
|
||||
#include "FreeRTOSConfig.h"
|
||||
#include "Pins.h"
|
||||
extern "C" {
|
||||
#include "bflb_platform.h"
|
||||
#include "bl702_i2c.h"
|
||||
}
|
||||
#include "history.hpp"
|
||||
#include <string.h>
|
||||
#define ADC_NORM_SAMPLES 16
|
||||
@@ -20,6 +23,10 @@ uint16_t ADCReadings[ADC_NORM_SAMPLES]; // room for 32 lots of the pair of readi
|
||||
|
||||
void hardware_init() {
|
||||
// #TODO
|
||||
gpio_set_mode(OLED_RESET_Pin, GPIO_OUTPUT_MODE);
|
||||
gpio_set_mode(KEY_A_Pin, GPIO_INPUT_PD_MODE);
|
||||
gpio_set_mode(KEY_B_Pin, GPIO_INPUT_PD_MODE);
|
||||
I2C_SetPrd(I2C0_ID, 15);
|
||||
}
|
||||
|
||||
uint16_t getADCHandleTemp(uint8_t sample) {
|
||||
|
||||
Reference in New Issue
Block a user