-
Notifications
You must be signed in to change notification settings - Fork 0
/
fuseresc.h
executable file
·52 lines (32 loc) · 973 Bytes
/
fuseresc.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
/* fuseresc.h
*
* Small program to recover bad fuse configurations
* Supported chips : Attiny 2313a/4313, Atmega 328P
*
* Copyright 2015 - 2017 (C) Taz8du29
* Refer to LICENSE.MD for more infos about copyright
*/
#ifndef _FUSE_RESCUE_H_
#define _FUSE_RESCUE_H_
/* DEPENDENCIES */
#include "myUtils.h"
/* CHIPS DEFAULT FUSES */
// Attiny 2313A
#define fresc_lowFuse 0x64
#define fresc_highFuse 0xDF
#define fresc_extFuse 0xFF
// Atmega 328P
// #define fresc_lowFuse 0x62
// #define fresc_highFuse 0xD9
// #define fresc_extFuse 0xFF
/* PROTOTYPES */
// Initializes the library
void fresc_init(void) __attribute__((always_inline));
// Low level functions
void fresc_enterProgMode(void) __attribute__((always_inline));
void fresc_leaveProgMode(void) __attribute__((always_inline));
// Main, user-level function
void fresc_eraseFuses(void) __attribute__((always_inline));
/* FUSE RESCUE FUNCTIONS */
#include "fuseresc.c"
#endif /* !_FUSE_RESCUE_H_ */