Skip to content

Commit

Permalink
Changes:
Browse files Browse the repository at this point in the history
-Comments removed

New:
-
  • Loading branch information
pi authored and pi committed Jul 10, 2014
1 parent 997381e commit d1757f3
Showing 1 changed file with 0 additions and 43 deletions.
43 changes: 0 additions & 43 deletions bananaIO/src/RaspberryPi.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,49 +37,6 @@ void InitializeRaspberryPi(){
CurrentSoc.Register.GpioClear = NewRegister(CurrentSoc.MappedMemory.GpioMemory, PortRegisterGpioClear, 2, 1);
CurrentSoc.Register.GpioValue = NewRegister(CurrentSoc.MappedMemory.GpioMemory, PortRegisterGpioValue, 2, 1);


/*
#define SOC_REGISTER_BYTE_PER_REGISTER 4 // All register are 32 Bit
#define SOC_REGISTER_BLOCKSIZE 4 // Each register has 4x 4 byte
#define SOC_REGISTER_PORT_SIZE 36 // Number of rows per port to calculate with uint32_t pointer
*/
/*
_t *mappedMemory, int portRegister, int portOffset, int bytePerRegister, int bitsPerPin, int size)
result->PortOffset = portOffset;
result->PortRegister = portRegister;
result->BitsPerPin = bitsPerPin;
//result->BitsPerRegister = bitsPerRegister;
result->PinsPerRegister = (bytePerRegister * 8) / result->BitsPerPin;
result->PinsPerPort = bytePerRegister * size * result->PinsPerRegister;
CurrentSoc.Register.GpioFunction = NewRegister(
CurrentSoc.MappedMemory.GpioMemory,
PortRegisterFunction,
SOC_REGISTER_BYTE_PER_REGISTER,
3,
4
);
CurrentSoc.Register.GpioPullMode = NewRegister(CurrentSoc.MappedMemory.GpioMemory, PortRegisterPullMode, portOffset, SOC_REGISTER_BYTE_PER_REGISTER, 2, 1);
// On A20 this points to the same register
CurrentSoc.Register.GpioSet = NewRegister(CurrentSoc.MappedMemory.GpioMemory, PortRegisterGpioSet, portOffset, SOC_REGISTER_BYTE_PER_REGISTER, 1, 1);
CurrentSoc.Register.GpioClear = NewRegister(CurrentSoc.MappedMemory.GpioMemory, PortRegisterGpioClear, portOffset, SOC_REGISTER_BYTE_PER_REGISTER, 1, 1);
CurrentSoc.Register.GpioValue = NewRegister(CurrentSoc.MappedMemory.GpioMemory, PortRegisterGpioValue, portOffset, SOC_REGISTER_BYTE_PER_REGISTER, 1, 1);
*/


/*
this->functionSelectRegister = new Register1((unsigned int) Bcm2835_Gpio::GpioRegister::FunctionSelect0, 6, 32, 3);
this->setPinRegister = new Register1((unsigned int) Bcm2835_Gpio::GpioRegister::PinOutputSet0, 2, 32, 1);
this->clearPinRegister = new Register1((unsigned int) Bcm2835_Gpio::GpioRegister::PinOutputClear0, 2, 32, 1);
this->valuesRegister = new Register1((unsigned int) Bcm2835_Gpio::GpioRegister::PinLevel0, 2, 32, 1);
this->resistorsModeRegister = new Register1((unsigned int) Bcm2835_Gpio::GpioRegister::PinPullUpDownMode, 1, 32, 1);
this->resistorsPinRegister = new Register1((unsigned int) Bcm2835_Gpio::GpioRegister::PinPullUpDownEnablePins, 2, 32, 1);
*/


}

void TestRaspberryPi()
Expand Down

0 comments on commit d1757f3

Please sign in to comment.