ATmega328p
Hardware definitions
Loading...
Searching...
No Matches
Fuse.h
Go to the documentation of this file.
1
5
6#ifndef ATMEGA328P_DEFINITIONS_FUSE_H
7#define ATMEGA328P_DEFINITIONS_FUSE_H
8
9#include <stdint.h>
10#include "Config.h"
11
13namespace atmega328p
14{
16 namespace fuse
17 {
19 enum class Byte : uint8_t
20 {
24 };
25
27 enum LowMask : uint8_t
28 {
29 ckdiv8 = 0x80,
30 ckout = 0x40,
31 sut1 = 0x20,
32 sut0 = 0x10,
33 cksel3 = 0x08,
34 cksel2 = 0x04,
35 cksel1 = 0x02,
36 cksel0 = 0x01,
37 };
38
40 enum HighMask : uint8_t
41 {
42 rstdisbl = 0x80,
43 dwen = 0x40,
44 spien = 0x20,
45 wdton = 0x10,
46 eesave = 0x08,
47 bootsz1 = 0x04,
48 bootsz0 = 0x02,
49 bootrst = 0x01,
50 };
51
53 enum ExtendedMask : uint8_t
54 {
55 bodlevel2 = 0x04,
56 bodlevel1 = 0x02,
57 bodlevel0 = 0x01,
58 };
59
60 enum : uint8_t
61 {
62 default_low = 0x62,
63 default_high = 0xD9,
64 default_ext = 0xFF,
67 };
68 }
69}
70
71#endif
Selects the ATmega328P package and operating grade.
Fuse byte identifiers and bit masks.
Definition Fuse.h:17
@ default_low
Default low.
Definition Fuse.h:62
@ programmed_value_is_zero
Programmed value is zero.
Definition Fuse.h:66
@ programmed_value
Programmed value.
Definition Fuse.h:65
@ default_ext
Default ext.
Definition Fuse.h:64
@ default_high
Default high.
Definition Fuse.h:63
Byte
Fuse byte identifiers.
Definition Fuse.h:20
@ Low
Low fuse byte.
Definition Fuse.h:21
@ High
High fuse byte.
Definition Fuse.h:22
@ Extended
Extended fuse byte.
Definition Fuse.h:23
ExtendedMask
Bit masks in the Extended Fuse byte.
Definition Fuse.h:54
@ bodlevel0
0x01 - Brown-out level bit 0.
Definition Fuse.h:57
@ bodlevel2
0x04 - Brown-out level bit 2.
Definition Fuse.h:55
@ bodlevel1
0x02 - Brown-out level bit 1.
Definition Fuse.h:56
HighMask
Bit masks in the High Fuse byte.
Definition Fuse.h:41
@ eesave
0x08 - Preserve EEPROM during chip erase.
Definition Fuse.h:46
@ dwen
0x40 - Enable debugWIRE.
Definition Fuse.h:43
@ bootsz1
0x04 - Boot size selection bit 1.
Definition Fuse.h:47
@ bootsz0
0x02 - Boot size selection bit 0.
Definition Fuse.h:48
@ spien
0x20 - Enable serial programming.
Definition Fuse.h:44
@ wdton
0x10 - Force watchdog always on.
Definition Fuse.h:45
@ rstdisbl
0x80 - Disable external RESET pin.
Definition Fuse.h:42
@ bootrst
0x01 - Start execution in boot section.
Definition Fuse.h:49
LowMask
Bit masks in the Low Fuse byte.
Definition Fuse.h:28
@ sut0
0x10 - Startup-time selection bit 0.
Definition Fuse.h:32
@ sut1
0x20 - Startup-time selection bit 1.
Definition Fuse.h:31
@ ckout
0x40 - Output system clock on CLKO.
Definition Fuse.h:30
@ cksel0
0x01 - Clock-source selection bit 0.
Definition Fuse.h:36
@ ckdiv8
0x80 - Divide startup clock by eight.
Definition Fuse.h:29
@ cksel1
0x02 - Clock-source selection bit 1.
Definition Fuse.h:35
@ cksel2
0x04 - Clock-source selection bit 2.
Definition Fuse.h:34
@ cksel3
0x08 - Clock-source selection bit 3.
Definition Fuse.h:33
Device-specific definitions for the ATmega328P.
Definition ADC.h:14