Parcourir la source

Fix rn42_linked() to use pullup

tags/v1.9
tmk il y a 9 ans
Parent
révision
807ed33a9a
1 fichiers modifiés avec 6 ajouts et 2 suppressions
  1. 6
    2
      keyboard/hhkb_rn42/rn42/rn42.c

+ 6
- 2
keyboard/hhkb_rn42/rn42/rn42.c Voir le fichier



// PF6: linked(input without pull-up) // PF6: linked(input without pull-up)
DDRF &= ~(1<<6); DDRF &= ~(1<<6);
PORTF &= ~(1<<6);
PORTF |= (1<<6);


// PF1: RTS(low: allowed to send, high: not allowed) // PF1: RTS(low: allowed to send, high: not allowed)
DDRF &= ~(1<<1); DDRF &= ~(1<<1);


bool rn42_linked(void) bool rn42_linked(void)
{ {
return PINF&(1<<6);
// RN-42 GPIO2
// Hi-Z: Not powered
// High: Linked
// Low: Connecting
return !rn42_rts() && PINF&(1<<6);
} }





Chargement…
Annuler
Enregistrer