keybrd library is an open source library for creating custom-keyboard firmware.
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
此仓库已存档。您可以查看文件和克隆,但不能推送或创建工单/合并请求。

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. }