ergodox-firmware/src/keyboard/controller/mcp23018.h

26 lines
976 B
C
Raw Normal View History

2012-06-15 07:03:47 +02:00
/* ----------------------------------------------------------------------------
2016-06-11 22:19:48 +02:00
* ergoDOX : controller : MCP23018 specific exports : functions
2012-06-15 07:03:47 +02:00
* ----------------------------------------------------------------------------
* Copyright (c) 2012 Ben Blazak <benblazak.dev@gmail.com>
* Released under The MIT License (MIT) (see "license.md")
* Project located at <https://github.com/benblazak/ergodox-firmware>
* ------------------------------------------------------------------------- */
2016-06-11 22:19:48 +02:00
#pragma once
2012-06-15 07:03:47 +02:00
#include <stdbool.h>
#include <stdint.h>
2016-06-11 22:19:48 +02:00
#include <util/twi.h>
#include "../../lib/teensy-2-0.h" // `TWI_FREQ` defined in "teensy-2-0.c"
#include "../options.h"
#include "../matrix.h"
// --------------------------------------------------------------------
2016-06-11 22:19:48 +02:00
#define MCP23018_TWI_ADDRESS 0b0100000
// --------------------------------------------------------------------
2012-06-15 07:03:47 +02:00
2016-06-11 22:19:48 +02:00
uint8_t mcp23018_init(void);
uint8_t mcp23018_update_matrix( bool matrix[KB_ROWS][KB_COLUMNS] );