IDI      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHNone *Clock phase (CPHA) for SPI transmissions. -Clock polarity (CPOL) for SPI transmissions. QThis describes which Chip Select pins are asserted (used in SPI communications). Either high or low. ,This describes the address of an I2C slave. PA GPIO pin can be either set to input mode, output mode or an alternative mode. This describes the pins on the Raspberry Pi boards. Since the BCM2835 SOC internally uses different numbers (and these numbers differ between versions, the library internally translates this pin number to the correct number. #APins for the P1 connector of the V1 revision of the Raspberry Pi 'APins for the P5 connector of the V2 revision of the Raspberry Pi 8APins for the P1 connector of the V2 revision of the Raspberry Pi 9kAny IO computation that accesses the GPIO pins using this library should be wrapped with this function; ie withGPIO $ do foo(. It prepares the file descriptors to devmem and makes sure everything is safely deallocated if an exception occurs. The behavior when accessing the GPIO outside of this function is undefined. :eAny IO computation that uses the I2C bus using this library should be wrapped with this function; ie withI2C $ do foo. It prepares the relevant pins for use with the I2C protocol and makes sure everything is safely returned to normal if an exception occurs. If you only use the GPIO pins for I2C, you can do withGPIO . withI2C $ do foor and it will work as expected. WARNING: after this function returns, the I2C pins will be set to Input, so use <% if you want to use them for output. ;oAny IO computation that uses the SPI functionality using this library should be wrapped with this function; ie withSPI $ do foo. It prepares the relevant pins for use with the SPI protocol and makes sure everything is safely returned to normal if an exception occurs. If you only use the GPIO pins for SPI, you can do withGPIO . withSPI $ do foor and it will work as expected. WARNING: after this function returns, the SPI pins will be set to Input, so use <% if you want to use them for output. <Sets the pin to either  or  mode. =!Sets the specified pin to either I or J. >0Returns the current state of the specified pin. ?ASets the clock divider for (and hence the speed of) the I2C bus. @#Sets the baud rate of the I2C bus. AWrites the data in the  ByteString to the specified I2C ,. Throws an IOException if an error occurs. B#Reads num bytes from the specified ,. Throws an IOException if an error occurs. CWrites the data in the  ByteString to the specified `, then issues a "repeated start" (with no prior stop) and then reads num bytes from the same J. Necessary for devices that require such behavior, such as the MLX90620. D:Sets the chip select pin(s). When a transfer is made with G or H@, the selected pin(s) will be asserted during the transfer. ESSets the chip select pin polarity for a given pin(s). When a transfer is made with G or H, the currently selected chip select pin(s) will be asserted to the LogicLevel supplied. When transfers are not happening, the chip select pin(s) return to the complement (inactive) value. F:Sets the SPI clock polarity and phase (ie, CPOL and CPHA) GTransfers one byte to and from the currently selected SPI slave. Asserts the currently selected CS pins (as previously set by D) during the transfer. Clocks the 8 bit value out on MOSI, and simultaneously clocks in data from MISO. Returns the read data byte from the slave. HTransfers any number of bytes to and from the currently selected SPI slave, one byte at a time. Asserts the currently selected CS pins (as previously set by Dg) during the transfer. Clocks 8 bit bytes out on MOSI, and simultaneously clocks in data from MISO. c  !"#$%&'()*+,-./012345678KLMNOPQRSTUVWXYZ[\]^_`9:;ab<=>c?@ABCDEFGHdI  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHI876543210/.-,+*)('&%$#"!   9<>=:?@ABC;DEFGH1  &876543210/.-,+*)('&%$#"! KLMNOPQRSTUVWXYZ[\]^_`9:;ab<=>c?@ABCDEFGHde      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMKLNOPQRSTUVWXYZ[\]^_`abcdefghi HPi-0.5.0System.RaspberryPi.GPIOCPHACPOLSPIPinCSNONECSBOTHCS1CS0 LogicLevelAddressPinModeAlt5Alt4Alt3Alt2Alt1Alt0OutputInputPinPinV1_26PinV1_24PinV1_23PinV1_22PinV1_21PinV1_19PinV1_18PinV1_16PinV1_15PinV1_13PinV1_12PinV1_11PinV1_10PinV1_08PinV1_07PinV1_05PinV1_03PinP5_06PinP5_05PinP5_04PinP5_03Pin26Pin24Pin23Pin22Pin21Pin19Pin18Pin16Pin15Pin13Pin12Pin11Pin10Pin08Pin07Pin05Pin03withGPIOwithI2CwithSPIsetPinFunctionwritePinreadPinsetI2cClockDividersetI2cBaudRatewriteI2CreadI2CwriteReadRSI2C chipSelectSPIsetChipSelectPolaritySPIsetDataModeSPI transferSPItransferManySPIghc-prim GHC.TypesTrueFalsec_setDataModeSPIc_setChipSelectPolarityc_chipSelectSPIc_transferManySPI c_transferSPIstopSPIinitSPIc_writeReadRSI2C c_readI2C c_writeI2Cc_setBaudRateI2Cc_setClockDividerI2Cc_setSlaveAddressI2CstopI2CinitI2C c_readPin c_writePinc_setPinFunctionsetDebugBCM2835 stopBCM2835 initBCM2835table actOnResultgetHwPin setI2cAddress $fEnumPinMode