keybrd library is an open source library for creating custom-keyboard firmware.
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

ColPort_AVR.cpp 433B

1234567891011121314151617
  1. #include "ColPort_AVR.h"
  2. /*
  3. configures column port's DDRx and PORTx.
  4. */
  5. ColPort_AVR::ColPort_AVR(volatile unsigned char& DDRx, volatile unsigned char& PORTx,
  6. volatile unsigned char& PINx, const uint8_t colPins)
  7. : ColPort(colPins), DDR(DDRx = ~colPins), PORT(PORTx = colPins), PIN(PINx)
  8. {}
  9. /*
  10. Saves all port-pin values to portState.
  11. */
  12. void ColPort_AVR::read()
  13. {
  14. portState = PIN;
  15. }