NAME

HiPi::BCM2835

VERSION

Version 0.01

SYNOPSYS

use HiPi::Constant qw( :raspberry :pinmode :serial
    :spi :i2c :wiring :bcm2835 :mcp23017 :htv2cmd
    :htv2baudrate );

DESCRIPTION

Export constants for various HiPi:: modules

EXPORTED CONSTANT TAGS

:raspberry

High / Low pin level setting

RPI_HIGH
RPI_LOW

The current RPi board revision

RPI_BOARD_REVISION

Constants to convert RPi pin header numbers to BCM GPIO pin numbers on RPi PAD 1 and PAD 5. These are suitable to pass Rasperry Pi GPIO header pin numbers to HiPi::BCM2835 functions.

RPI_TOGPIO_P1_3
RPI_TOGPIO_P1_5
RPI_TOGPIO_P1_7
RPI_TOGPIO_P1_8 
RPI_TOGPIO_P1_10 
RPI_TOGPIO_P1_11
RPI_TOGPIO_P1_12
RPI_TOGPIO_P1_13 
RPI_TOGPIO_P1_15
RPI_TOGPIO_P1_16 
RPI_TOGPIO_P1_18
RPI_TOGPIO_P1_19 
RPI_TOGPIO_P1_21
RPI_TOGPIO_P1_22
RPI_TOGPIO_P1_23
RPI_TOGPIO_P1_24
RPI_TOGPIO_P1_26

RPI_TOGPIO_P5_3
RPI_TOGPIO_P5_4
RPI_TOGPIO_P5_5
RPI_TOGPIO_P5_6

:pinmode

PIN_MODE_OUTPUT 
PIN_MODE_INPUT

:serial

Constants to convert named RPi header pins to Raspberry Pi header pin numbers. These are suitable for passing to HiPi::GPIO::PADx methods as pin identifiers.

UART0_TXD
UART0_RXD
UART0_RTS
UART1_TXD
UART1_RXD
UART1_RTS

:spi

Constants to convert named RPi header pins to Raspberry Pi header pin numbers. These are suitable for passing to HiPi::GPIO::PADx methods as pin identifiers.

SPI0_MOSI
SPI0_MISO
SPI0_CLK
SPI0_SCLK
SPI0_CEO_N
SPI0_CE1_N

:i2c

Constants to convert named RPi header pins to Raspberry Pi header pin numbers. These are suitable for passing to HiPi::GPIO::PADx methods as pin identifiers.

I2C0_SDA
I2C0_SCL

:wiring

Constants to convert WiringPi pin numbers to Raspberry Pi header pin numbers. These are suitable for passing to HiPi::GPIO::PADx methods as pin identifiers. They may be useful when converting code designed for the WiringPi library to use HiPi::GPIO::PADx modules.

WPI_PIN_0 
WPI_PIN_1 
WPI_PIN_2 
WPI_PIN_3 
WPI_PIN_4 
WPI_PIN_5 
WPI_PIN_6 
WPI_PIN_7 
WPI_PIN_8 
WPI_PIN_9 
WPI_PIN_10 
WPI_PIN_11 
WPI_PIN_12
WPI_PIN_13 
WPI_PIN_14 
WPI_PIN_15 
WPI_PIN_16
WPI_PIN_17 
WPI_PIN_18 
WPI_PIN_19 
WPI_PIN_20 

Constants to for HiPi::Wiring methods.

WPI_NUM_PINS
WPI_MODE_PINS
WPI_MODE_GPIO
WPI_MODE_GPIO_SYS
WPI_MODE_PIFACE
WPI_INPUT
WPI_OUTPUT
WPI_PWM_OUTPUT
WPI_LOW
WPI_HIGH
WPI_PUD_OFF
WPI_PUD_DOWN
WPI_PUD_UP
WPI_PWM_MODE_MS
WPI_PWM_MODE_BAL
WPI_NES_RIGHT
WPI_NES_LEFT
WPI_NES_DOWN
WPI_NES_UP
WPI_NES_START
WPI_NES_SELECT
WPI_NES_B
WPI_NES_A

:bcm2835

Constants to convert BCM 2835 GPIO pin numbers to Raspberry Pi header pin numbers. These are suitable for passing to HiPi::GPIO::PADx methods as pin identifiers. They may be useful when converting code designed for the bcm2835 library to use HiPi::GPIO::PADx modules.

BCM_0 
BCM_1 
BCM_4 
BCM_7  
BCM_8 
BCM_9 
BCM_10
BCM_11 
BCM_14 
BCM_15
BCM_17 
BCM_18 
BCM_21 
BCM_22 
BCM_23
BCM_24
BCM_25
BCM_2
BCM_3
BCM_27 
BCM_28
BCM_29 
BCM_30 
BCM_31 

:mcp23017

Constants for use with HiPi::MCP23017

MCP23017_A0
MCP23017_A1 
MCP23017_A2   
MCP23017_A3   
MCP23017_A4 
MCP23017_A5 
MCP23017_A6 
MCP23017_A7 
MCP23017_B0 
MCP23017_B1 
MCP23017_B2 
MCP23017_B3 
MCP23017_B4 
MCP23017_B5 
MCP23017_B6 
MCP23017_B7 

MCP23017_BANK 
MCP23017_MIRROR
MCP23017_SEQOP
MCP23017_DISSLW
MCP23017_HAEN 
MCP23017_ODR
MCP23017_INTPOL

:htv2cmd

Constants for use with HiPi::Control::LCD::HTBackPackV2

HTV2_CMD_PRINT 
HTV2_CMD_SET_CURSOR_POS
HTV2_CMD_CLEAR_LINE 
HTV2_CMD_CLEAR_DISPLAY
HTV2_CMD_LCD_TYPE
HTV2_CMD_HD44780_CMD
HTV2_CMD_BACKLIGHT
HTV2_CMD_WRITE_CHAR 
HTV2_CMD_I2C_ADDRESS 
HTV2_CMD_BAUD_RATE
HTV2_CMD_CUSTOM_CHAR

:htv2baud

Constants for use with HiPi::Control::LCD::HTBackPackV2

HTV2_BAUD_2400 
HTV2_BAUD_4800
HTV2_BAUD_9600
HTV2_BAUD_14400
HTV2_BAUD_19200
HTV2_BAUD_28800
HTV2_BAUD_57600 
HTV2_BAUD_115200

LICENSE

This work is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or any later version.

License Note

I would normally release any Perl code under the Perl Artistic License but this module wraps several GPL / LGPL C libraries and I feel that the licensing of the entire distribution is simpler if the Perl code is under GPL too.

AUTHOR

Mark Dootson, <mdootson at cpan.org>

COPYRIGHT

Copyright (C) 2012-2013 Mark Dootson, all rights reserved.