Loading...
Searching...
No Matches
cpu_conf.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2014 Freie Universität Berlin
3 *
4 * This file is subject to the terms and conditions of the GNU Lesser General
5 * Public License v2.1. See the file LICENSE in the top level directory for more
6 * details.
7 */
8
9#pragma once
10
22
23#include "cpu_conf_common.h"
24#include "vendor/nrf51.h"
25#include "vendor/nrf51_bitfields.h"
26#include "vendor/nrf51822_peripherals.h"
27
28#ifdef __cplusplus
29extern "C" {
30#endif
31
36#define CPU_DEFAULT_IRQ_PRIO (1U)
37#define CPU_IRQ_NUMOF (26U)
38#define CPU_FLASH_BASE (0x00000000)
40
45#define FLASHPAGE_SIZE (1024U)
46
47#if defined(CPU_MODEL_NRF51X22XXAA) || defined(CPU_MODEL_NRF51X22XXAC)
48#define FLASHPAGE_NUMOF (256U)
49#elif defined(CPU_MODEL_NRF51X22XXAB)
50#define FLASHPAGE_NUMOF (128U)
51#endif
52/* The minimum block size which can be written is 4B. However, the erase
53 * block is always FLASHPAGE_SIZE.
54 */
55#define FLASHPAGE_WRITE_BLOCK_SIZE (4U)
56/* Writing should be always 4 bytes aligned */
57#define FLASHPAGE_WRITE_BLOCK_ALIGNMENT (4U)
59
65#ifndef CONFIG_GNRC_PKTBUF_SIZE
66#define CONFIG_GNRC_PKTBUF_SIZE (2048)
67#endif
69
74#define PWM_GPIOTE_CH (2U)
75#define PWM_PPI_A (0U)
76#define PWM_PPI_B (1U)
78
79#ifdef __cplusplus
80}
81#endif
82