lpc_peripherals.h File Reference
This file provides LPC peripheral numbers according to LPC17xx datasheet. More...
#include <stdbool.h>
Include dependency graph for lpc_peripherals.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.
Functions | |
| void | lpc_pconp (lpc_pconp_t peripheral, bool on) |
| void | lpc_pclk (lpc_pclk_t peripheral, clkdiv_t divider) |
Detailed Description
This file provides LPC peripheral numbers according to LPC17xx datasheet.
DO NOT INCLUDE THIS FILE DIRECTLY. IT IS AUTOMATICALLY INCLUDED WHEN YOU INCLUDE LPC17xx.h
Enumeration Type Documentation
| enum clkdiv_t |
| enum lpc_pclk_t |
This enumeration matches peripheral clock registers (PCLKSEL0 and PCLKSEL1)
| enum lpc_pconp_t |
This enumeration matches the PCONP register numbers for peripherals.
Function Documentation
| void lpc_pclk | ( | lpc_pclk_t | peripheral, |
| clkdiv_t | divider | ||
| ) |
Sets the peripheral clock divider.
- Parameters
-
peripheral The peripheral type.
- See also
- lpc_pclk_t
- Parameters
-
divider The divider type
- Note
- The reset value for all peripherals is clkdiv_4
This is a quick and dirty trick to use uint64_t such that we don't have to use if/else statements to pick either PCLKSEL0 or PCLKSEL1 register.
| void lpc_pconp | ( | lpc_pconp_t | peripheral, |
| bool | on | ||
| ) |
Powers ON or powers OFF the peripheral
- Parameters
-
peripheral The peripheral type.
- See also
- lpc_pconp_t
- Parameters
-
on If true, peripheral is turned on, otherwise turned off

1.8.11