Loading...
Searching...
No Matches
cpu.h
1/*
2 * SPDX-FileCopyrightText: 2013 Freie Universität Berlin (FUB)
3 * SPDX-License-Identifier: LGPL-2.1-only
4 */
5
6#pragma once
7
14
15#include <stdio.h>
16#include <stdbool.h>
17
18#include "lpc23xx.h"
19#include "arm_cpu.h"
20
21#ifdef __cplusplus
22extern "C" {
23#endif
24
25extern uintptr_t __stack_start;
26
30void cpu_init_pll(void);
31
35void cpu_init_mam(void);
36
40void lpc23xx_pclk_scale(uint32_t source, uint32_t target, uint32_t *pclksel, uint32_t *prescale);
41
45void cpu_init_clks(void);
46
50bool install_irq(int IntNumber, void (*HandlerAddr)(void), int Priority);
51
52#ifdef MODULE_PERIPH
53void gpio_init_ports(void);
54#endif
55
59static inline bool cpu_woke_from_backup(void) {
60 return RSIR == 0;
61}
62
67
71#define CPU_HAS_BACKUP_RAM (1)
72
73#ifdef __cplusplus
74}
75#endif
76
uintptr_t __stack_start
end of user stack memory space
void cpu_init_clks(void)
Initialize lpc23xx cpu clocks.
static bool cpu_woke_from_backup(void)
Returns true if the CPU woke from Deep Sleep.
Definition cpu.h:59
bool cpu_backup_ram_is_initialized(void)
Returns true if the backup RAM has been initialized.
void lpc23xx_pclk_scale(uint32_t source, uint32_t target, uint32_t *pclksel, uint32_t *prescale)
Scale lpc23xx cpu speed.
void cpu_init_mam(void)
Initialize the Memory Acceleration Module.
void cpu_init_pll(void)
Initialize the phase lock loop oscillator.
bool install_irq(int IntNumber, void(*HandlerAddr)(void), int Priority)
install lpc23xx irq