Set up ADC files

This commit is contained in:
Ea-r-th
2025-09-21 14:01:47 -07:00
parent 5b66b044b7
commit 9550b1b61d
7 changed files with 73 additions and 2 deletions

View File

@@ -38,6 +38,8 @@ set(PROJECT_INCLUDE_DIRECTORIES
SHAL/Include/Peripheral/UART/Reg
SHAL/Include/Peripheral/I2C
SHAL/Include/Peripheral/I2C/Reg
SHAL/Include/Peripheral/ADC
SHAL/Include/Peripheral/ADC/Reg
SHAL/Include/Peripheral/EXT/
${CMAKE_CURRENT_SOURCE_DIR}/SHAL/Include
)

View File

@@ -0,0 +1,8 @@
//
// Created by Luca on 9/21/2025.
//
#ifndef SHMINGO_HAL_SHAL_ADC_REG_H
#define SHMINGO_HAL_SHAL_ADC_REG_H
#endif //SHMINGO_HAL_SHAL_ADC_REG_H

View File

@@ -0,0 +1,20 @@
//
// Created by Luca on 9/21/2025.
//
#ifndef SHMINGO_HAL_SHAL_ADC_REG_F072XB_H
#define SHMINGO_HAL_SHAL_ADC_REG_F072XB_H
#include "SHAL_CORE.h"
#include "SHAL_ADC_TYPES.h"
enum class ADC_Key{
S_ADC1,
NUM_ADC,
INVALID
};
#endif //SHMINGO_HAL_SHAL_ADC_REG_F072XB_H

View File

@@ -0,0 +1,8 @@
//
// Created by Luca on 9/21/2025.
//
#ifndef SHMINGO_HAL_SHAL_ADC_TYPES_H
#define SHMINGO_HAL_SHAL_ADC_TYPES_H
#endif //SHMINGO_HAL_SHAL_ADC_TYPES_H

View File

@@ -0,0 +1,32 @@
//
// Created by Luca on 9/21/2025.
//
#ifndef SHMINGO_HAL_SHAL_ADC_H
#define SHMINGO_HAL_SHAL_ADC_H
class SHAL_ADC {
public:
private:
};
class ADCManager{
public:
private:
};
#endif //SHMINGO_HAL_SHAL_ADC_H

View File

@@ -0,0 +1,3 @@
//
// Created by Luca on 9/21/2025.
//

View File

@@ -66,8 +66,6 @@ int main() {
PIN(A4).setPinMode(PinMode::OUTPUT_MODE);
PIN(A5).setPinMode(PinMode::OUTPUT_MODE);
SHAL_delay_ms(3000); //Wait 100 ms from datasheet
uint8_t cmd = 0x71;