Remove superfluous JTAG disable code (#6445)
* Remove superfluous JTAG disable code * 32A has differently named register * Accidentally some operators * 32A also has different JTAG pins * Wrap disable_jtag() in an ifndef * Document this new define * Rename the define, it conflicts with a LUFA thing Also, move the ifndef wrapping to the call in keyboard_setup()
This commit is contained in:
parent
977c316eb1
commit
f2c179de58
19 changed files with 15 additions and 94 deletions
|
@ -63,9 +63,6 @@ void matrix_init(void)
|
|||
#ifdef UART_RGB_ENABLE
|
||||
uart_rgb_init();
|
||||
#endif
|
||||
// disable JTAG
|
||||
MCUCR = _BV(JTD);
|
||||
MCUCR = _BV(JTD);
|
||||
|
||||
// 85 REST
|
||||
DDRD |= _BV(PD7);
|
||||
|
|
|
@ -6,10 +6,6 @@ void matrix_init_kb(void) {
|
|||
// put your keyboard start-up code here
|
||||
// runs once when the firmware starts up
|
||||
matrix_init_user();
|
||||
|
||||
// JTAG disable for PORT F. write JTD bit twice within four cycles.
|
||||
MCUCR |= (1<<JTD);
|
||||
MCUCR |= (1<<JTD);
|
||||
};
|
||||
|
||||
void led_set_kb(uint8_t usb_led) {
|
||||
|
|
|
@ -8,10 +8,6 @@ void matrix_init_kb(void) {
|
|||
// runs once when the firmware starts up
|
||||
matrix_init_user();
|
||||
led_init_ports();
|
||||
|
||||
// JTAG disable for PORT F. write JTD bit twice within four cycles.
|
||||
MCUCR |= (1<<JTD);
|
||||
MCUCR |= (1<<JTD);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -8,10 +8,6 @@ void matrix_init_kb(void) {
|
|||
// runs once when the firmware starts up
|
||||
matrix_init_user();
|
||||
led_init_ports();
|
||||
|
||||
// JTAG disable for PORT F. write JTD bit twice within four cycles.
|
||||
MCUCR |= (1<<JTD);
|
||||
MCUCR |= (1<<JTD);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -77,10 +77,6 @@ uint8_t matrix_cols(void)
|
|||
|
||||
void matrix_init(void)
|
||||
{
|
||||
// disable JTAG
|
||||
MCUCR = (1<<JTD);
|
||||
MCUCR = (1<<JTD);
|
||||
|
||||
unselect_rows();
|
||||
init_cols();
|
||||
|
||||
|
|
|
@ -104,13 +104,6 @@ uint8_t matrix_cols(void) {
|
|||
}
|
||||
|
||||
void matrix_init(void) {
|
||||
|
||||
// To use PORTF disable JTAG with writing JTD bit twice within four cycles.
|
||||
#if (defined(__AVR_AT90USB1286__) || defined(__AVR_AT90USB1287__) || defined(__AVR_ATmega32U4__))
|
||||
MCUCR |= _BV(JTD);
|
||||
MCUCR |= _BV(JTD);
|
||||
#endif
|
||||
|
||||
// initialize row and col
|
||||
unselect_rows();
|
||||
init_cols();
|
||||
|
|
|
@ -26,10 +26,6 @@ host_driver_t rn42_driver = {
|
|||
|
||||
void rn42_init(void)
|
||||
{
|
||||
// JTAG disable for PORT F. write JTD bit twice within four cycles.
|
||||
MCUCR |= (1<<JTD);
|
||||
MCUCR |= (1<<JTD);
|
||||
|
||||
// PF7: BT connection control(high: connect, low: disconnect)
|
||||
rn42_autoconnect();
|
||||
|
||||
|
|
|
@ -172,10 +172,6 @@ uint8_t matrix_cols(void)
|
|||
|
||||
void matrix_init(void)
|
||||
{
|
||||
// To use PORTF disable JTAG with writing JTD bit twice within four cycles.
|
||||
MCUCR |= (1<<JTD);
|
||||
MCUCR |= (1<<JTD);
|
||||
|
||||
// initialize row and col
|
||||
setup_io_pins();
|
||||
setup_leds();
|
||||
|
|
|
@ -77,10 +77,6 @@ uint8_t matrix_cols(void)
|
|||
|
||||
void matrix_init(void)
|
||||
{
|
||||
// disable JTAG
|
||||
MCUCR = (1<<JTD);
|
||||
MCUCR = (1<<JTD);
|
||||
|
||||
unselect_rows();
|
||||
init_cols();
|
||||
|
||||
|
|
|
@ -1,14 +1,9 @@
|
|||
#include "launchpad.h"
|
||||
|
||||
void matrix_init_kb(void) {
|
||||
|
||||
// JTAG disable for PORT F. write JTD bit twice within four cycles.
|
||||
MCUCR |= (1<<JTD);
|
||||
MCUCR |= (1<<JTD);
|
||||
|
||||
// Undo init of RX LED, we use that port currently
|
||||
//DDRB &= ~(1<<0);
|
||||
|
||||
matrix_init_user();
|
||||
|
||||
};
|
||||
};
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
#pragma once
|
||||
#define DISABLE_JTAG // The keyboard uses PF4 and PF7, which are used by JTAG.
|
||||
|
||||
#include "lets_split.h"
|
||||
|
||||
|
|
|
@ -237,5 +237,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
//#define EE_HANDS
|
||||
#define I2C_MASTER_LEFT
|
||||
//#define I2C_MASTER_RIGHT
|
||||
|
||||
#define DISABLE_JTAG
|
||||
|
|
|
@ -113,13 +113,6 @@ uint8_t matrix_cols(void) {
|
|||
}
|
||||
|
||||
void matrix_init(void) {
|
||||
|
||||
/* To use PORTF disable JTAG with writing JTD bit twice within four cycles. */
|
||||
#if (defined(__AVR_AT90USB1286__) || defined(__AVR_AT90USB1287__) || defined(__AVR_ATmega32U4__))
|
||||
MCUCR |= _BV(JTD);
|
||||
MCUCR |= _BV(JTD);
|
||||
#endif
|
||||
|
||||
mcp23018_status = true;
|
||||
|
||||
/* initialize row and col */
|
||||
|
|
|
@ -136,12 +136,6 @@ bool has_usb(void) {
|
|||
|
||||
void matrix_init(void)
|
||||
{
|
||||
#ifdef DISABLE_JTAG
|
||||
// JTAG disable for PORT F. write JTD bit twice within four cycles.
|
||||
MCUCR |= (1<<JTD);
|
||||
MCUCR |= (1<<JTD);
|
||||
#endif
|
||||
|
||||
// initialize row and col
|
||||
#if (DIODE_DIRECTION == COL2ROW)
|
||||
unselect_rows();
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
#ifndef REV1_H
|
||||
#define REV1_H
|
||||
#define DISABLE_JTAG // The keyboard uses PF4, PF5 and PF7, which are used by JTAG.
|
||||
#define EE_HANDS // This isn't optional for the vitamins included
|
||||
|
||||
#include QMK_KEYBOARD_H
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue