In the Espruino repo you'll find scripts/build_js_hardware.js which'll work out some JS code with all the addresses and flags for the peripherals you specify in - it might make your life a bit easier :)
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
In the Espruino repo you'll find
scripts/build_js_hardware.js
which'll work out some JS code with all the addresses and flags for the peripherals you specify in - it might make your life a bit easier :)