Hi
LPC1549 MCU also with ROM Power control API code, there with LPCOpen [wwdt] demo also call the power control API function.
The default demo path is: ..\lpcopen_2_20_keil_iar_nxp_lpcxpresso_1549\applications\lpc15xx\iar\nxp_lpcxpresso_1549
In <romapi_15xx.h> file with below definition:
/**
* @brief LPC15XX High level ROM API structure
*/
typedef struct {
const uint32_t pUSBD; /*!< USBD API function table base address */
const uint32_t reserved0; /*!< Reserved */
const CAND_API_T *pCAND; /*!< C_CAN API function table base address */
const PWRD_API_T *pPWRD; /*!< Power API function table base address */
const uint32_t reserved1; /*!< Reserved */
const I2CD_API_T *pI2CD; /*!< I2C driver API function table base address */
const DMAD_API_T *pDMAD; /*!< DMA driver API function table base address */
const SPID_API_T *pSPID; /*!< I2C driver API function table base address */
const ADCD_API_T *pADCD; /*!< ADC driver API function table base address */
const UARTD_API_T *pUARTD; /*!< UART driver API function table base address */
} LPC_ROM_API_T;
/* Pointer to ROM API function address */
#define LPC_ROM_API_BASE_LOC 0x03000200UL
#define LPC_ROM_API (*(LPC_ROM_API_T * *) LPC_ROM_API_BASE_LOC)
So the ROM definition is similar with LPC_ROM_API_T struct.
pPWRD is Power control api function table base address;
There only with one option (low power mode) for set_voltage() function param0.
Wish it helps.
Have a great day,
Ma Hui
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------