formatting change.

This commit is contained in:
Jake Goodwin 2025-03-09 09:34:18 -07:00
parent 60a6cf345f
commit a7682c802a
2 changed files with 17 additions and 7 deletions

View file

@ -28,7 +28,7 @@
#include "ADC.h" #include "ADC.h"
#include "RegEdit.h" #include "RegEdit.h"
#include "ch32fun.h" #include "ch32v003hw.h"
#define MAX_PIN_NUM 7 #define MAX_PIN_NUM 7
@ -45,6 +45,11 @@ void ADC_Setup(void)
{ {
} }
void ADC_PowerOn(void)
{
RegEdit_SetBit((void *)&ADC1->CTLR2, ADC_ADON);
}
void ADC_Init(uint8_t pin_num) void ADC_Init(uint8_t pin_num)
{ {
if (IsInvalidPin(pin_num)) if (IsInvalidPin(pin_num))

View file

@ -27,6 +27,11 @@
*/ */
void ADC_Init(uint8_t pin_num); void ADC_Init(uint8_t pin_num);
/**
* @brief Enables the ADC
*/
void ADC_PowerOn(void);
/** /**
* @brief Enables the ADC * @brief Enables the ADC
*/ */