Parallel bus emulation by GPIO ports
Dependencies: mbed parallel_bus
main.cpp
- Committer:
- nxp_ip
- Date:
- 2012-07-10
- Revision:
- 0:b0587d0181e1
- Child:
- 1:84f14b88a570
File content as of revision 0:b0587d0181e1:
#include "mbed.h" #include "hardware_abs.h" #define ADDR 0xC3 char data[] = { 0xFE, 0xFD, 0xFC, 0xFB, 0xFA, 0xF9, 0xF8, 0xF7, 0xF6, 0xF5, 0xF4, 0xF3, 0xF2, 0xF1, 0xF0, 0xEF }; char v; int main() { hardware_initialize(); reset( 10, 1000 ); write_data( 0xCA, 0x55 ); write_data( 0xDA, 0xAA ); v = read_data( 0xCA ); v = read_data( 0xDA ); write_data_burst( 0xC3, data, sizeof( data ) ); while (1) ; }