power.c 544 B

1234567891011121314151617181920212223242526
  1. /* ___DISCLAIMER___ */
  2. #include <arm/NXP/LPC17xx/LPC17xx.h>
  3. #include "bits.h"
  4. #include "power.h"
  5. /*
  6. required units:
  7. * SSP0 (FPGA interface) [enabled via spi_init]
  8. * UART3 (debug console) [enabled via uart_init]
  9. * TIM3 (FPGA clock)
  10. * RTC
  11. * GPIO
  12. * GPDMA [enabled via spi_init]
  13. * USB [enabled via usb_init]
  14. * PWM1
  15. */
  16. void power_init() {
  17. LPC_SC->PCONP = BV(PCSSP0)
  18. | BV(PCTIM3)
  19. | BV(PCRTC)
  20. | BV(PCGPIO)
  21. | BV(PCPWM1)
  22. // | BV(PCUSB)
  23. ;
  24. }