Home | Trees | Indices | Help |
---|
|
1 """ 2 Copyright (c) 2015 Alan Yorinks All rights reserved. 3 4 This program is free software; you can redistribute it and/or 5 modify it under the terms of the GNU General Public 6 License as published by the Free Software Foundation; either 7 version 3 of the License, or (at your option) any later version. 8 9 This library is distributed in the hope that it will be useful, 10 but WITHOUT ANY WARRANTY; without even the implied warranty of 11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 General Public License for more details. 13 14 You should have received a copy of the GNU General Public 15 License along with this library; if not, write to the Free Software 16 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 17 """ 18 1921 """ 22 This class contains a set of constants that may be used by the applications writer. 23 """ 24 # pin modes 25 INPUT = 0x00 # pin set as input 26 OUTPUT = 0x01 # pin set as output 27 ANALOG = 0x02 # analog pin in analogInput mode 28 PWM = 0x03 # digital pin in PWM output mode 29 SERVO = 0x04 # digital pin in Servo output mode 30 I2C = 0x06 # pin included in I2C setup 31 ONEWIRE = 0x07 # possible future feature 32 STEPPER = 0x08 # any pin in stepper mode 33 TONE = 0x09 # Any pin in TONE mode 34 ENCODER = 0x0a 35 SONAR = 0x0b # Any pin in SONAR mode 36 IGNORE = 0x7f 37 38 # Tone commands 39 TONE_TONE = 0 # play a tone 40 TONE_NO_TONE = 1 # turn off tone 41 42 # I2C command operation modes 43 I2C_WRITE = 0B00000000 44 I2C_READ = 0B00001000 45 I2C_READ_CONTINUOUSLY = 0B00010000 46 I2C_STOP_READING = 0B00011000 47 I2C_READ_WRITE_MODE_MASK = 0B00011000 48 I2C_10BIT_ADDRESS_MODE_MASK = 0B00100000 49 I2C_END_TX_MASK = 0B01000000 50 I2C_STOP_TX = 1 51 I2C_RESTART_TX = 0 52 53 # latch states 54 LATCH_IGNORE = 0 # this item currently not participating in latching 55 LATCH_ARMED = 1 # When the next pin value change is received for this pin, if it matches the latch criteria 56 # the data will be latched 57 LATCH_LATCHED = 2 # data has been latched. Read the data to re-arm the latch 58 59 # latch threshold types 60 LATCH_EQ = 0 # data value is equal to the latch threshold value 61 LATCH_GT = 1 # data value is greater than the latch threshold value 62 LATCH_LT = 2 # data value is less than the latch threshold value 63 LATCH_GTE = 3 # data value is greater than or equal to the latch threshold value 64 LATCH_LTE = 4 # data value is less than or equal to the latch threshold value 65 66 # indices into latch table entry for manual read of latch data 67 LATCH_STATE = 0 68 LATCHED_THRESHOLD_TYPE = 1 69 70 LATCH_DATA_TARGET = 2 71 LATCHED_DATA = 3 72 LATCHED_TIME_STAMP = 4 73 LATCH_CALLBACK = 5 74 75 # indices for data returned for a latch callback 76 LATCH_CALL_BACK_PIN = 0 77 LATCH_CALL_BACK_DATA = 1 78 LATCH_CALLBACK_TIME_STAMP = 279
Home | Trees | Indices | Help |
---|
Generated by Epydoc 3.0.1 on Sat Jul 18 11:34:08 2015 | http://epydoc.sourceforge.net |