Merge pull request #826 from mattallen37/master

Add support for VDDHDIV5
This commit is contained in:
Ha Thach authored and GitHub committed 2024-07-18 17:31:02 +07:00
commit 4dcfa3b796
2 files changed
+15

No files matched your search

+8
View File
@@ -92,6 +92,14 @@ extern uint32_t analogRead( uint32_t ulPin ) ;
*/
extern uint32_t analogReadVDD( void ) ;
#ifdef SAADC_CH_PSELP_PSELP_VDDHDIV5
/*
* \brief Read the value from the vddh pin with div5.
*
* \return Read value from vddh pin with div5, if no error.
*/
extern uint32_t analogReadVDDHDIV5( void ) ;
#endif
/*
* \brief Set the resolution of analogRead return values. Default is 10 bits (range from 0 to 1023).
+7
View File
@@ -284,6 +284,13 @@ uint32_t analogReadVDD( void )
return analogRead_internal(SAADC_CH_PSELP_PSELP_VDD);
}
#ifdef SAADC_CH_PSELP_PSELP_VDDHDIV5
uint32_t analogReadVDDHDIV5( void )
{
return analogRead_internal(SAADC_CH_PSELP_PSELP_VDDHDIV5);
}
#endif
void analogCalibrateOffset( void )
{
// Enable the SAADC