With all MSP432 devices, a copy of DriverLib is included within the device’s ROM space. This
allows programmers to take advantage of using high level APIs without having to worry about
additional memory overhead of a flash library. In addition to a more optimized execution, the user
can drastically cut down the memory footprint requirement of their application when using the
software Driver Libraries available in ROM.
Accessing Driver Library APIs in ROM is as easy as including the rom.h header file, and then
replacing normal API calls with a ROM_ prefix. For example, take the following API from the pcm.c
module that changes the power state to PCM_AM_DCDC_VCORE1:
PCM_setPowerState(PCM_AM_DCDC_VCORE1);
After including the rom.h file, all that would have to be done to switch to the ROM equivalent of the
API would be add the ROM_ prefix to the API:
ROM_PCM_setPowerState(PCM_AM_DCDC_VCORE1);
While the majority of DriverLib APIs are available in ROM, due to architectural limitations some
APIs are omitted from being included in ROM. In addition, if any bug fixes were added to the API
after the device ROM was programmed, it is desirable to use the flash version of the API. An
"intelligence" has been created to account for this problem. If the user includes the rom_map.h
header file and uses the MAP_ prefix in front of the API, the header file will automatically use
preprocessor macros to decide whether to use a ROM or flash version of the API.
MAP_PCM_setPowerState(PCM_AM_DCDC_VCORE1);
这一段话想表达什么意思
知道的告诉一下 谢谢