Movatterモバイル変換


[0]ホーム

URL:


 / 
RPi-Const-1.04
River stage one • 6 direct dependents • 6 total dependents
/RPi::Const

NAME

RPi::Const - Constant variables for embedded programming, including the RPi:: family of modules

SYNOPSIS

use RPi::Const (:all);# or...use RPi::Const (:pinmode);# etc

DESCRIPTION

This module optionally exports selections or all constant variables used within theRPi::WiringPi suite.

CONSTANT EXPORT TAGS

These are the individual grouping of export tags. The:all tag includes all of the below.

:mode

Setup modes. This is what determines which pin numbering scheme you're using. SeewiringPi setup modes for details.

RPI_MODE_WPI      =>  0, # wiringPi schemeRPI_MODE_GPIO     =>  1, # GPIO schemeRPI_MODE_GPIO_SYS =>  2, # GPIO scheme in SYS modeRPI_MODE_PHYS     =>  3, # physical pin layout schemeRPI_MODE_UNINIT   => -1, # setup not yet run

:pinmode

Pin modes.

INPUT            => 0,OUTPUT           => 1,PWM_OUT          => 2,GPIO_CLOCK       => 3,SOFT_PWM_OUTPUT  => 4,  # reservedSOFT_TONE_OUTPUT => 5,  # reservedPWM_TONE_OUTPUT  => 6,  # reserved

:altmode

Pin ALT modes.

ALT0 => 4,ALT1 => 5,ALT2 => 6,ALT3 => 7,ALT4 => 3,ALT5 => 2,

:pull

Internal pin pull up/down resistor state.

PUD_OFF  => 0,PUD_DOWN => 1,PUD_UP   => 2,

:state

HIGH => 1,LOW  => 0,ON   => 1,OFF  => 0,

:pwm_mode

The modes the PWM can be set to.

PWM_MODE_MS  => 0,PWM_MODE_BAL => 1,

:pwm_defaults

Hardware defaults for PWM settings.

PWM_DEFAULT_MODE => 1, # balanced modePWM_DEFAULT_CLOCK => 32,PWM_DEFAULT_RANGE => 1023

:interrupt

Edge detection states for interrupts.

EDGE_SETUP   => 0,  # reservedEDGE_FALLING => 1,EDGE_RISING  => 2,EDGE_BOTH    => 3,

:mcp23017_registers

Hardware register locations and related info for the MCP23107 GPIO Expander

MCP23017_IODIRA     => 0x00,MCP23017_IODIRB     => 0x01,MCP23017_IPOLA      => 0x02,MCP23017_IPOLB      => 0x03,MCP23017_GPINTENA   => 0x04,MCP23017_GPINTENB   => 0x05,MCP23017_DEFVALA    => 0x06,MCP23017_DEFVALB    => 0x07,MCP23017_INTCONA    => 0x08,MCP23017_INTCONB    => 0x09,MCP23017_IOCONA     => 0x0A,MCP23017_IOCONB     => 0x0B,MCP23017_GPPUA      => 0x0C,MCP23017_GPPUB      => 0x0D,MCP23017_INTFA      => 0x0E,MCP23017_INTFB      => 0x0F,MCP23017_INTCAPA    => 0x10,MCP23017_INTCAPB    => 0x11,MCP23017_GPIOA      => 0x12,MCP23017_GPIOB      => 0x13,MCP23017_OLATA      => 0x14,MCP23017_OLATB      => 0x15,MCP23017_INPUT      => 1,MCP23017_OUTPUT     => 0

AUTHOR

Steve Bertrand, <steveb@cpan.org>

COPYRIGHT AND LICENSE

Copyright (C) 2016 by Steve Bertrand

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.18.2 or, at your option, any later version of Perl 5 you may have available.

Module Install Instructions

To install RPi::Const, copy and paste the appropriate command in to your terminal.

cpanm

cpanm RPi::Const

CPAN shell

perl -MCPAN -e shellinstall RPi::Const

For more information on module installation, please visitthe detailed CPAN module installation guide.

Keyboard Shortcuts

Global
sFocus search bar
?Bring up this help dialog
GitHub
gpGo to pull requests
gigo to github issues (only if github is preferred repository)
POD
gaGo to author
gcGo to changes
giGo to issues
gdGo to dist
grGo to repository/SCM
gsGo to source
gbGo to file browse
Search terms
module: (e.g.module:Plugin)
distribution: (e.g.distribution:Dancer auth)
author: (e.g.author:SONGMU Redis)
version: (e.g.version:1.00)

[8]ページ先頭

©2009-2025 Movatter.jp