qmk / qmk_firmware

Open-source keyboard firmware for Atmel AVR and Arm USB families
https://qmk.fm
GNU General Public License v2.0
18.24k stars 39.3k forks source link

Reading fuses to determine bootloader start #1661

Closed jackhumbert closed 4 years ago

jackhumbert commented 7 years ago

This information doesn't really need to be an option in QMK - it's configurable via the fuses, and if we read from that, we'd be doing the same thing that the actual reset button does (it's stored in the HIGH byte):

#include <avr/boot.h>;

uint8_t high = boot_lock_fuse_bits_get(GET_HIGH_FUSE_BITS);
if (high & 0b110)
// 256
else if (high & 0b010)
// 512
else if (high & 0b100)
// 1024
else
// 2048
drashna commented 6 years ago

I think that you fixed this already? https://github.com/qmk/qmk_firmware/blob/7c9d5ace143d3cc6d767a354acde814926d566fd/tmk_core/common/avr/bootloader.c#L81-L93

drashna commented 6 years ago

@jackhumbert Okay if I close this?

stale[bot] commented 4 years ago

This issue has been automatically marked as resolved because it has not had activity in the last 90 days. It will be closed in the next 30 days unless it is tagged properly or other activity occurs.