Skip to content

Commit b59b709

Browse files
committed
Make library compile on H7
1 parent 34ba77e commit b59b709

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

Diff for: src/Board.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,7 @@ void Board::setAllPeripheralsPower(bool on){
248248
#endif
249249
}
250250

251+
#if defined(ARDUINO_PORTENTA_C33)
251252
void Board::setAnalogDigitalConverterPower(bool on){
252253
if(on){
253254
PMIC.getControl()->turnLDO1On(Ldo1Mode::Normal);
@@ -259,6 +260,7 @@ void Board::setAnalogDigitalConverterPower(bool on){
259260
PMIC.getControl()->turnLDO1Off(Ldo1Mode::Standby);
260261
}
261262
}
263+
#endif
262264

263265
void Board::setCommunicationPeripheralsPower(bool on){
264266
if(on)

Diff for: src/Board.h

+6-3
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
#include <Arduino.h>
55
#include <Arduino_PF1550.h>
6-
#include "wireUtils.h"
6+
#include "WireUtils.h"
77

88

99
#if defined(ARDUINO_PORTENTA_C33)
@@ -199,25 +199,27 @@ class Board {
199199
*/
200200
void deepSleepUntilWakeupEvent();
201201

202-
#if defined(ARDUINO_PORTENTA_C33)
203202
/**
204203
* @brief Toggle the peripherals' power on Portenta C33 (ADC, RGB LED, Secure Element, Wifi and Bluetooth).
205204
* @param on True to turn on the power, false to turn it off.
206205
*/
207206
void setAllPeripheralsPower(bool on);
208207

208+
209209
/**
210210
* @brief Toggles the communication peripherials' power on Portenta C33 (Wifi, Bluetooth and Secure Element)
211211
* @param on True to turn on the power, false to turn it off.
212212
*/
213213
void setCommunicationPeripheralsPower(bool on);
214214

215+
#if defined(ARDUINO_PORTENTA_C33)
215216
/**
216217
* @brief Toggles the power of the analog digital converter on Portenta C33.
217218
* @param on True to turn on the power, false to turn it off.
218219
*/
219220
void setAnalogDigitalConverterPower(bool on);
220221

222+
#endif
221223
/**
222224
* @brief Set the reference voltage on Portenta C33. This value is used by the ADC to convert analog values to digital values.
223225
* This can be particularly useful to increase the accuracy of the ADC when working with low voltages
@@ -226,7 +228,8 @@ class Board {
226228
* @return True if the voltage was set successfully, false otherwise.
227229
*/
228230
bool setReferenceVoltage(float voltage);
229-
#endif
231+
232+
// TODO add function to shut down the fuel gauge / and hibernate mode
230233

231234
private:
232235
static uint8_t getRailVoltage(float voltage, int context);

0 commit comments

Comments
 (0)