Old fashion design for PC-104
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

39 lines
569 B

4 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. #include "stdafx.h"
  2. #include "ports.h"
  3. void Port_Init( void )
  4. {
  5. XBYTE SFRPAGE_SAVE = SFRPAGE;
  6. SFRPAGE = CONFIG_PAGE;
  7. XBR0 = 0x00;
  8. XBR1 = 0x00;
  9. XBR2 = 0x40;
  10. P0MDOUT = 0x00;
  11. P0 = ~P0MDOUT;
  12. P1MDOUT = 0x00;
  13. P1 = ~P1MDOUT;
  14. P2MDOUT = 0x00;
  15. P2 = ~P2MDOUT;
  16. P3MDOUT = 0x00;
  17. P3 = ~P3MDOUT;
  18. P4MDOUT = 0x00;
  19. P4 = ~P4MDOUT;
  20. P5MDOUT = 0x00;
  21. P5 = ~P5MDOUT;
  22. P6MDOUT = 0x00;
  23. P6 = ~P6MDOUT;
  24. P7MDOUT = 0x00;
  25. P7 = ~P7MDOUT;
  26. SFRPAGE = SFRPAGE_SAVE;
  27. }