Mod54415 Factory demo -confusion

Discussion to talk about software related topics only.
Post Reply
jediengineer
Posts: 192
Joined: Mon Dec 17, 2012 6:24 am

Mod54415 Factory demo -confusion

Post by jediengineer »

Hey Netburner staff - can you clarify something? This is in the webfuncs.cpp file:

/*-------------------------------------------------------------------
* On the MOD-DEV-70, the switches are on J2 connector pins:
* 8, 6, 7, 10, 9, 11, 12, 13 (in that order). These signals are
* Analog to Digital, not GPIO, so we read the analog value and
* determine the switch postion from it.
* ------------------------------------------------------------------*/
BYTE ReadSwitch()
{
static BOOL bReadSwitchInit = FALSE;
const BYTE PinNumber[8] = { 7, 6, 5, 3, 4, 1, 0, 2 }; // map J2 conn signals pins to A/D number 0-7

BYTE BitMask = 0;

Which pins are they actually mapped to? Does it follow the schematic diagram or does it follow the pin numbers in the array? I will assume that it follows the schematic, because the program reads the voltage across the ADC, but if the program is written to read different pins, how is it working?
Post Reply