From c2d3fbcb1cfe6c4f44c193c462ec19815c5f9436 Mon Sep 17 00:00:00 2001 From: Philip Howard Date: Sat, 27 Feb 2016 17:29:38 +0000 Subject: [PATCH] Update and rename constants.i to constants..py --- constants..py | 39 +++++++++++++++++++++++++++++++++++++++ constants.i | 39 --------------------------------------- 2 files changed, 39 insertions(+), 39 deletions(-) create mode 100644 constants..py delete mode 100644 constants.i diff --git a/constants..py b/constants..py new file mode 100644 index 0000000..808160c --- /dev/null +++ b/constants..py @@ -0,0 +1,39 @@ +# wiringPi modes + +WPI_MODE_PINS = 0; +WPI_MODE_GPIO = 1; +WPI_MODE_GPIO_SYS = 2; +WPI_MODE_PHYS = 3; +WPI_MODE_PIFACE = 4; +WPI_MODE_UNINITIALISED = -1; + +# Pin modes + +INPUT = 0; +OUTPUT = 1; +PWM_OUTPUT = 2; +GPIO_CLOCK = 3; +SOFT_PWM_OUTPUT = 4; +SOFT_TONE_OUTPUT = 5; +PWM_TONE_OUTPUT = 6; + +LOW = 0; +HIGH = 1; + +# Pull up/down/none + +PUD_OFF = 0; +PUD_DOWN = 1; +PUD_UP = 2; + +# PWM + +PWM_MODE_MS = 0; +PWM_MODE_BAL = 1; + +# Interrupt levels + +INT_EDGE_SETUP = 0; +INT_EDGE_FALLING = 1; +INT_EDGE_RISING = 2; +INT_EDGE_BOTH = 3; diff --git a/constants.i b/constants.i deleted file mode 100644 index 47224d2..0000000 --- a/constants.i +++ /dev/null @@ -1,39 +0,0 @@ -// wiringPi modes - -%constant int WPI_MODE_PINS = 0; -%constant int WPI_MODE_GPIO = 1; -%constant int WPI_MODE_GPIO_SYS = 2; -%constant int WPI_MODE_PHYS = 3; -%constant int WPI_MODE_PIFACE = 4; -%constant int WPI_MODE_UNINITIALISED = -1; - -// Pin modes - -%constant int INPUT = 0; -%constant int OUTPUT = 1; -%constant int PWM_OUTPUT = 2; -%constant int GPIO_CLOCK = 3; -%constant int SOFT_PWM_OUTPUT = 4; -%constant int SOFT_TONE_OUTPUT = 5; -%constant int PWM_TONE_OUTPUT = 6; - -%constant int LOW = 0; -%constant int HIGH = 1; - -// Pull up/down/none - -%constant int PUD_OFF = 0; -%constant int PUD_DOWN = 1; -%constant int PUD_UP = 2; - -// PWM - -%constant int PWM_MODE_MS = 0; -%constant int PWM_MODE_BAL = 1; - -// Interrupt levels - -%constant int INT_EDGE_SETUP = 0; -%constant int INT_EDGE_FALLING = 1; -%constant int INT_EDGE_RISING = 2; -%constant int INT_EDGE_BOTH = 3;