cleanup read_fuse_lock()
This commit is contained in:
parent
d1f7b638d1
commit
93453d0aaa
11
main.c
11
main.c
@ -226,8 +226,9 @@ static inline uint16_t readEEpromPage(uint16_t address, pagebuf_t size)
|
||||
return address;
|
||||
}
|
||||
|
||||
static uint8_t read_fuse_lock(uint16_t addr, uint8_t mode)
|
||||
static uint8_t read_fuse_lock(uint16_t addr)
|
||||
{
|
||||
uint8_t mode = (1<<BLBSET) | (1<<SPMEN);
|
||||
uint8_t retval;
|
||||
|
||||
asm volatile
|
||||
@ -462,19 +463,19 @@ int main(void)
|
||||
#warning "Extension 'ReadFuseLock' enabled"
|
||||
// read "low" fuse bits
|
||||
} else if (val == 'F') {
|
||||
sendchar(read_fuse_lock(0x0000, (1<<BLBSET) | (1<<SPMEN)));
|
||||
sendchar(read_fuse_lock(GET_LOW_FUSE_BITS));
|
||||
|
||||
// read lock bits
|
||||
} else if (val == 'r') {
|
||||
sendchar(read_fuse_lock(0x0001, (1<<BLBSET) | (1<<SPMEN)));
|
||||
sendchar(read_fuse_lock(GET_LOCK_BITS));
|
||||
|
||||
// read high fuse bits
|
||||
} else if (val == 'N') {
|
||||
sendchar(read_fuse_lock(0x0003, (1<<BLBSET) | (1<<SPMEN)));
|
||||
sendchar(read_fuse_lock(GET_HIGH_FUSE_BITS));
|
||||
|
||||
// read extended fuse bits
|
||||
} else if (val == 'Q') {
|
||||
sendchar(read_fuse_lock(0x0002, (1<<BLBSET) | (1<<SPMEN)));
|
||||
sendchar(read_fuse_lock(GET_EXTENDED_FUSE_BITS));
|
||||
#endif
|
||||
|
||||
// Return device type
|
||||
|
Loading…
Reference in New Issue
Block a user