mirror of
https://github.com/DCC-EX/CommandStation-EX.git
synced 2024-11-22 15:46:14 +01:00
277431e84c
commit2bbb5c1119
Author: Asbelos <asbelos@btinternet.com> Date: Fri Sep 20 12:13:21 2024 +0100 EXRAIL use neopixel range instead of loop commit3aabb51888
Author: Asbelos <asbelos@btinternet.com> Date: Wed Sep 18 17:06:00 2024 +0100 Neopixel signals with blue-tint See Release Notes file commit8e6fe6df21
Author: Asbelos <asbelos@btinternet.com> Date: Thu Sep 12 08:35:26 2024 +0100 HAL write range commit66e57b5ab2
Author: Asbelos <asbelos@btinternet.com> Date: Sun Sep 8 09:26:37 2024 +0100 Killblink on neopixel set. commit360c426675
Merge:dd16e0d
b026417
Author: Asbelos <asbelos@btinternet.com> Date: Sat Sep 7 16:45:29 2024 +0100 Merge branch 'devel' into devel-pauls-i2c-devices commitdd16e0da97
Author: Asbelos <asbelos@btinternet.com> Date: Sat Sep 7 13:00:26 2024 +0100 Notes commite823db3d24
Author: Asbelos <asbelos@btinternet.com> Date: Sat Sep 7 11:16:30 2024 +0100 Neopixel change to 8,8,8 commitd3d6cc97fb
Author: Asbelos <asbelos@btinternet.com> Date: Fri Sep 6 13:25:44 2024 +0100 Neopixel <o> cmd commit03d8d5f93d
Author: Asbelos <asbelos@btinternet.com> Date: Fri Sep 6 08:08:18 2024 +0100 Its working!! commit235f3c82b5
Author: Asbelos <asbelos@btinternet.com> Date: Thu Sep 5 22:02:29 2024 +0100 Update IO_NeoPixel.h commit530b77bbab
Author: Asbelos <asbelos@btinternet.com> Date: Tue Sep 3 15:04:40 2024 +0100 NEOPIXEL driver and macros commit2a895fbbd5
Author: Asbelos <asbelos@btinternet.com> Date: Tue Sep 3 11:26:17 2024 +0100 First compile neopixel driver commitc6f2db7909
Merge:a7df84b
7395aa4
Author: Asbelos <asbelos@btinternet.com> Date: Tue Sep 3 10:07:12 2024 +0100 Merge branch 'devel' into devel-pauls-i2c-devices commita7df84b01c
Author: Asbelos <asbelos@btinternet.com> Date: Tue Sep 3 09:56:05 2024 +0100 NEOPIXEL EXRAIL commitead6e5afa1
Author: Asbelos <asbelos@btinternet.com> Date: Tue Sep 3 09:55:36 2024 +0100 NEOPIXEL EXRAIL commit0cb175544e
Author: pmantoine <pma-github@milleng.com.au> Date: Sat Feb 24 17:29:10 2024 +0800 More TCA8418 commit2082051801
Author: pmantoine <pma-github@milleng.com.au> Date: Sat Feb 24 13:02:34 2024 +0800 TCA8418 initial HAL driver scaffolding
370 lines
8.2 KiB
C
370 lines
8.2 KiB
C
/*
|
|
* © 2020-2022 Chris Harlow. All rights reserved.
|
|
* © 2022-2023 Colin Murdoch
|
|
* © 2023 Harald Barth
|
|
*
|
|
* This file is part of CommandStation-EX
|
|
*
|
|
* This 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
|
|
* (at your option) any later version.
|
|
*
|
|
* It is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License
|
|
* along with CommandStation. If not, see <https://www.gnu.org/licenses/>.
|
|
*/
|
|
|
|
// This file cleans and resets the RMFT2 Macros.
|
|
// It is used between passes to reduce complexity in RMFT2Macros.h
|
|
// DO NOT add an include guard to this file.
|
|
|
|
// Undefine all RMFT macros
|
|
#undef ACTIVATE
|
|
#undef ACTIVATEL
|
|
#undef AFTER
|
|
#undef AFTEROVERLOAD
|
|
#undef ALIAS
|
|
#undef AMBER
|
|
#undef ANOUT
|
|
#undef ASPECT
|
|
#undef AT
|
|
#undef ATGTE
|
|
#undef ATLT
|
|
#undef ATTIMEOUT
|
|
#undef AUTOMATION
|
|
#undef AUTOSTART
|
|
#undef BLINK
|
|
#undef BROADCAST
|
|
#undef CALL
|
|
#undef CLEAR_STASH
|
|
#undef CLEAR_ALL_STASH
|
|
#undef CLOSE
|
|
#undef CONFIGURE_SERVO
|
|
#undef DCC_SIGNAL
|
|
#undef DCCX_SIGNAL
|
|
#undef DCC_TURNTABLE
|
|
#undef DEACTIVATE
|
|
#undef DEACTIVATEL
|
|
#undef DELAY
|
|
#undef DELAYMINS
|
|
#undef DELAYRANDOM
|
|
#undef DONE
|
|
#undef DRIVE
|
|
#undef ELSE
|
|
#undef ENDEXRAIL
|
|
#undef ENDIF
|
|
#undef ENDTASK
|
|
#undef ESTOP
|
|
#undef EXRAIL
|
|
#undef EXTT_TURNTABLE
|
|
#undef FADE
|
|
#undef FOFF
|
|
#undef FOLLOW
|
|
#undef FON
|
|
#undef FORGET
|
|
#undef FTOGGLE
|
|
#undef FREE
|
|
#undef FWD
|
|
#undef GREEN
|
|
#undef HAL
|
|
#undef HAL_IGNORE_DEFAULTS
|
|
#undef IF
|
|
#undef IFAMBER
|
|
#undef IFCLOSED
|
|
#undef IFGREEN
|
|
#undef IFGTE
|
|
#undef IFLOCO
|
|
#undef IFLT
|
|
#undef IFNOT
|
|
#undef IFRANDOM
|
|
#undef IFRED
|
|
#undef IFRESERVE
|
|
#undef IFTHROWN
|
|
#undef IFTIMEOUT
|
|
#undef IFTTPOSITION
|
|
#undef IFRE
|
|
#undef INVERT_DIRECTION
|
|
#undef JMRI_SENSOR
|
|
#undef JOIN
|
|
#undef KILLALL
|
|
#undef LATCH
|
|
#undef LCD
|
|
#undef SCREEN
|
|
#undef LCC
|
|
#undef LCCX
|
|
#undef LCN
|
|
#undef MOVETT
|
|
#undef NEOPIXEL
|
|
#undef NEOPIXEL_OFF
|
|
#undef NEOPIXEL_SIGNAL
|
|
#undef ACON
|
|
#undef ACOF
|
|
#undef ONACON
|
|
#undef ONACOF
|
|
#undef MESSAGE
|
|
#undef ONACTIVATE
|
|
#undef ONACTIVATEL
|
|
#undef ONAMBER
|
|
#undef ONDEACTIVATE
|
|
#undef ONDEACTIVATEL
|
|
#undef ONCLOSE
|
|
#undef ONLCC
|
|
#undef ONTIME
|
|
#undef ONCLOCKTIME
|
|
#undef ONCLOCKMINS
|
|
#undef ONOVERLOAD
|
|
#undef ONGREEN
|
|
#undef ONRED
|
|
#undef ONROTATE
|
|
#undef ONBUTTON
|
|
#undef ONSENSOR
|
|
#undef ONTHROW
|
|
#undef ONCHANGE
|
|
#undef PARSE
|
|
#undef PAUSE
|
|
#undef PICKUP_STASH
|
|
#undef PIN_TURNOUT
|
|
#undef PRINT
|
|
#ifndef DISABLE_PROG
|
|
#undef POM
|
|
#endif
|
|
#undef POWEROFF
|
|
#undef POWERON
|
|
#undef READ_LOCO
|
|
#undef RED
|
|
#undef RESERVE
|
|
#undef RESET
|
|
#undef RESUME
|
|
#undef RETURN
|
|
#undef REV
|
|
#undef ROSTER
|
|
#undef ROTATE
|
|
#undef ROTATE_DCC
|
|
#undef ROUTE
|
|
#undef ROUTE_ACTIVE
|
|
#undef ROUTE_INACTIVE
|
|
#undef ROUTE_HIDDEN
|
|
#undef ROUTE_DISABLED
|
|
#undef ROUTE_CAPTION
|
|
#undef SENDLOCO
|
|
#undef SEQUENCE
|
|
#undef SERIAL
|
|
#undef SERIAL1
|
|
#undef SERIAL2
|
|
#undef SERIAL3
|
|
#undef SERIAL4
|
|
#undef SERIAL5
|
|
#undef SERIAL6
|
|
#undef SERVO
|
|
#undef SERVO2
|
|
#undef SERVO_TURNOUT
|
|
#undef SERVO_SIGNAL
|
|
#undef SET
|
|
#undef SET_TRACK
|
|
#undef SET_POWER
|
|
#undef SETLOCO
|
|
#undef SETFREQ
|
|
#undef SIGNAL
|
|
#undef SIGNALH
|
|
#undef SPEED
|
|
#undef START
|
|
#undef STASH
|
|
#undef STEALTH
|
|
#undef STEALTH_GLOBAL
|
|
#undef STOP
|
|
#undef THROW
|
|
#undef TOGGLE_TURNOUT
|
|
#undef TT_ADDPOSITION
|
|
#undef TURNOUT
|
|
#undef TURNOUTL
|
|
#undef UNJOIN
|
|
#undef UNLATCH
|
|
#undef VIRTUAL_SIGNAL
|
|
#undef VIRTUAL_TURNOUT
|
|
#undef WAITFOR
|
|
#ifndef IO_NO_HAL
|
|
#undef WAITFORTT
|
|
#endif
|
|
#undef WITHROTTLE
|
|
#undef XFOFF
|
|
#undef XFON
|
|
#undef XFTOGGLE
|
|
|
|
#ifndef RMFT2_UNDEF_ONLY
|
|
#define ACTIVATE(addr,subaddr)
|
|
#define ACTIVATEL(addr)
|
|
#define AFTER(sensor_id,timer...)
|
|
#define AFTEROVERLOAD(track_id)
|
|
#define ALIAS(name,value...)
|
|
#define AMBER(signal_id)
|
|
#define ANOUT(vpin,value,param1,param2)
|
|
#define AT(sensor_id)
|
|
#define ASPECT(address,value)
|
|
#define ATGTE(sensor_id,value)
|
|
#define ATLT(sensor_id,value)
|
|
#define ATTIMEOUT(sensor_id,timeout_ms)
|
|
#define AUTOMATION(id,description)
|
|
#define AUTOSTART
|
|
#define BLINK(vpin,onDuty,offDuty)
|
|
#define BROADCAST(msg)
|
|
#define CALL(route)
|
|
#define CLEAR_STASH(id)
|
|
#define CLEAR_ALL_STASH(id)
|
|
#define CLOSE(id)
|
|
#define CONFIGURE_SERVO(vpin,pos1,pos2,profile)
|
|
#define DCC_SIGNAL(id,add,subaddr)
|
|
#define DCCX_SIGNAL(id,redAspect,amberAspect,greenAspect)
|
|
#define DCC_TURNTABLE(id,home,description)
|
|
#define DEACTIVATE(addr,subaddr)
|
|
#define DEACTIVATEL(addr)
|
|
#define DELAY(mindelay)
|
|
#define DELAYMINS(mindelay)
|
|
#define DELAYRANDOM(mindelay,maxdelay)
|
|
#define DONE
|
|
#define DRIVE(analogpin)
|
|
#define ELSE
|
|
#define ENDEXRAIL
|
|
#define ENDIF
|
|
#define ENDTASK
|
|
#define ESTOP
|
|
#define EXRAIL
|
|
#define EXTT_TURNTABLE(id,vpin,home,description)
|
|
#define FADE(pin,value,ms)
|
|
#define FOFF(func)
|
|
#define FOLLOW(route)
|
|
#define FON(func)
|
|
#define FORGET
|
|
#define FREE(blockid)
|
|
#define FTOGGLE(func)
|
|
#define FWD(speed)
|
|
#define GREEN(signal_id)
|
|
#define HAL(haltype,params...)
|
|
#define HAL_IGNORE_DEFAULTS
|
|
#define IF(sensor_id)
|
|
#define IFAMBER(signal_id)
|
|
#define IFCLOSED(turnout_id)
|
|
#define IFGREEN(signal_id)
|
|
#define IFGTE(sensor_id,value)
|
|
#define IFLOCO(loco_id)
|
|
#define IFLT(sensor_id,value)
|
|
#define IFNOT(sensor_id)
|
|
#define IFRANDOM(percent)
|
|
#define IFRED(signal_id)
|
|
#define IFTHROWN(turnout_id)
|
|
#define IFRESERVE(block)
|
|
#define IFTIMEOUT
|
|
#define IFTTPOSITION(turntable_id,position)
|
|
#define IFRE(sensor_id,value)
|
|
#define INVERT_DIRECTION
|
|
#define JMRI_SENSOR(vpin,count...)
|
|
#define JOIN
|
|
#define KILLALL
|
|
#define LATCH(sensor_id)
|
|
#define LCC(eventid)
|
|
#define LCCX(senderid,eventid)
|
|
#define LCD(row,msg)
|
|
#define SCREEN(display,row,msg)
|
|
#define LCN(msg)
|
|
#define MESSAGE(msg)
|
|
#define MOVETT(id,steps,activity)
|
|
#define NEOPIXEL(id,r,g,b,count...)
|
|
#define NEOPIXEL_SIGNAL(sigid,redcolour,ambercolour,greencolour)
|
|
#define ACON(eventid)
|
|
#define ACOF(eventid)
|
|
#define ONACON(eventid)
|
|
#define ONACOF(eventid)
|
|
#define ONACTIVATE(addr,subaddr)
|
|
#define ONACTIVATEL(linear)
|
|
#define ONAMBER(signal_id)
|
|
#define ONTIME(value)
|
|
#define ONCLOCKTIME(hours,mins)
|
|
#define ONCLOCKMINS(mins)
|
|
#define ONOVERLOAD(track_id)
|
|
#define ONDEACTIVATE(addr,subaddr)
|
|
#define ONDEACTIVATEL(linear)
|
|
#define ONCLOSE(turnout_id)
|
|
#define ONLCC(sender,event)
|
|
#define ONGREEN(signal_id)
|
|
#define ONRED(signal_id)
|
|
#define ONROTATE(turntable_id)
|
|
#define ONTHROW(turnout_id)
|
|
#define ONCHANGE(sensor_id)
|
|
#define ONSENSOR(sensor_id)
|
|
#define ONBUTTON(sensor_id)
|
|
#define PAUSE
|
|
#define PIN_TURNOUT(id,pin,description...)
|
|
#define PRINT(msg)
|
|
#define PARSE(msg)
|
|
#define PICKUP_STASH(id)
|
|
#ifndef DISABLE_PROG
|
|
#define POM(cv,value)
|
|
#endif
|
|
#define POWEROFF
|
|
#define POWERON
|
|
#define READ_LOCO
|
|
#define RED(signal_id)
|
|
#define RESERVE(blockid)
|
|
#define RESET(pin)
|
|
#define RESUME
|
|
#define RETURN
|
|
#define REV(speed)
|
|
#define ROTATE(turntable_id,position,activity)
|
|
#define ROTATE_DCC(turntable_id,position)
|
|
#define ROSTER(cab,name,funcmap...)
|
|
#define ROUTE(id,description)
|
|
#define ROUTE_ACTIVE(id)
|
|
#define ROUTE_INACTIVE(id)
|
|
#define ROUTE_HIDDEN(id)
|
|
#define ROUTE_DISABLED(id)
|
|
#define ROUTE_CAPTION(id,caption)
|
|
#define SENDLOCO(cab,route)
|
|
#define SEQUENCE(id)
|
|
#define SERIAL(msg)
|
|
#define SERIAL1(msg)
|
|
#define SERIAL2(msg)
|
|
#define SERIAL3(msg)
|
|
#define SERIAL4(msg)
|
|
#define SERIAL5(msg)
|
|
#define SERIAL6(msg)
|
|
#define SERVO(id,position,profile)
|
|
#define SERVO2(id,position,duration)
|
|
#define SERVO_SIGNAL(vpin,redpos,amberpos,greenpos)
|
|
#define SERVO_TURNOUT(id,pin,activeAngle,inactiveAngle,profile,description...)
|
|
#define SET(pin)
|
|
#define SET_TRACK(track,mode)
|
|
#define SET_POWER(track,onoff)
|
|
#define SETLOCO(loco)
|
|
#define SETFREQ(freq)
|
|
#define SIGNAL(redpin,amberpin,greenpin)
|
|
#define SIGNALH(redpin,amberpin,greenpin)
|
|
#define SPEED(speed)
|
|
#define START(route)
|
|
#define STASH(id)
|
|
#define STEALTH(code...)
|
|
#define STEALTH_GLOBAL(code...)
|
|
#define STOP
|
|
#define THROW(id)
|
|
#define TOGGLE_TURNOUT(id)
|
|
#define TT_ADDPOSITION(turntable_id,position,value,angle,description...)
|
|
#define TURNOUT(id,addr,subaddr,description...)
|
|
#define TURNOUTL(id,addr,description...)
|
|
#define UNJOIN
|
|
#define UNLATCH(sensor_id)
|
|
#define VIRTUAL_SIGNAL(id)
|
|
#define VIRTUAL_TURNOUT(id,description...)
|
|
#define WAITFOR(pin)
|
|
#ifndef IO_NO_HAL
|
|
#define WAITFORTT(turntable_id)
|
|
#endif
|
|
#define WITHROTTLE(msg)
|
|
#define XFOFF(cab,func)
|
|
#define XFON(cab,func)
|
|
#define XFTOGGLE(cab,func)
|
|
|
|
#endif
|