Set up ADC files
This commit is contained in:
8
SHAL/Include/Peripheral/ADC/Reg/SHAL_ADC_REG.h
Normal file
8
SHAL/Include/Peripheral/ADC/Reg/SHAL_ADC_REG.h
Normal 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
|
||||
20
SHAL/Include/Peripheral/ADC/Reg/SHAL_ADC_REG_F072xB.h
Normal file
20
SHAL/Include/Peripheral/ADC/Reg/SHAL_ADC_REG_F072xB.h
Normal 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
|
||||
8
SHAL/Include/Peripheral/ADC/Reg/SHAL_ADC_TYPES.h
Normal file
8
SHAL/Include/Peripheral/ADC/Reg/SHAL_ADC_TYPES.h
Normal 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
|
||||
32
SHAL/Include/Peripheral/ADC/SHAL_ADC.h
Normal file
32
SHAL/Include/Peripheral/ADC/SHAL_ADC.h
Normal 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
|
||||
3
SHAL/Src/Peripheral/ADC/SHAL_ADC.cpp
Normal file
3
SHAL/Src/Peripheral/ADC/SHAL_ADC.cpp
Normal file
@@ -0,0 +1,3 @@
|
||||
//
|
||||
// Created by Luca on 9/21/2025.
|
||||
//
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user