mirror of
https://github.com/dougg3/mac-rom-simm-programmer.git
synced 2024-11-22 06:32:23 +00:00
1595c69890
It does add some complexity to the code. I may be going through a chain of calls just to turn the CS pin on, for instance. Hopefully I'm not going too crazy with this. Anyway, this means that I can control the ports from a SIMM electrical test routine using the same types of functions that the actual programming controlling code would use, without having to duplicate a bunch of port definitions and bit manipulation. I made sure to add all the functions I can think of needing to the ports module. We'll see if I got them all!
23 lines
463 B
C
23 lines
463 B
C
/*
|
|
* mcp23s17.h
|
|
*
|
|
* Created on: Nov 25, 2011
|
|
* Author: Doug
|
|
*/
|
|
|
|
#ifndef MCP23S17_H_
|
|
#define MCP23S17_H_
|
|
|
|
#include <stdint.h>
|
|
|
|
void MCP23S17_Init();
|
|
void MCP23S17_SetDDR(uint16_t ddr);
|
|
void MCP23S17_SetPins(uint16_t data);
|
|
uint16_t MCP23S17_ReadPins(void);
|
|
void MCP23S17_SetPullups(uint16_t pullups);
|
|
uint16_t MCP23S17_GetOutputs(void);
|
|
uint16_t MCP23S17_GetDDR(void);
|
|
uint16_t MCP23S17_GetPullups(void);
|
|
|
|
#endif /* MCP23S17_H_ */
|