Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
bsp.h
00001 ////////////////////////////////////////////////////////////////////////////// 00002 // Model: Network.qm 00003 // File: ./bsp.h 00004 // 00005 // This file has been generated automatically by QP Modeler (QM). 00006 // DO NOT EDIT THIS FILE MANUALLY. 00007 // 00008 // Please visit www.state-machine.com/qm for more information. 00009 ////////////////////////////////////////////////////////////////////////////// 00010 #ifndef bsp_h 00011 #define bsp_h 00012 00013 #include "mbed.h" 00014 00015 // System clock tick rate [Hz] 00016 #define BSP_TICKS_PER_SEC 100 00017 00018 enum BSP_CarsSignal { 00019 CARS_RED, CARS_YELLOW, CARS_GREEN, CARS_BLANK 00020 }; 00021 00022 enum BSP_PedsSignal { 00023 PEDS_DONT_WALK, PEDS_WALK, PEDS_BLANK 00024 }; 00025 00026 enum BSP_SenseSignal { 00027 SENSE_1_CON, SENSE_1_DIS, SENSE 00028 }; 00029 00030 void BSP_init(void); 00031 void BSP_signalCars(BSP_CarsSignal sig); 00032 void BSP_signalPeds(BSP_PedsSignal sig); 00033 void BSP_showState(char const *state); 00034 00035 void BSP_signalSense(BSP_SenseSignal sig); 00036 00037 void BSP_chk_io(); 00038 00039 00040 class N4S2 { 00041 00042 public: 00043 static const int N_FACES = 4; 00044 static const int S_FACES = 2; 00045 00046 static DigitalIn geomSenses[N_FACES]; // geomSenses [face], face = 1-4 00047 static DigitalOut geomTxs[S_FACES]; // geomTxs [face], face = 1-*2* 00048 00049 static SerialHalfDuplex sPort1; 00050 static SerialHalfDuplex sPort2; 00051 static SerialHalfDuplex sPorts[2]; //seg ports in array format 00052 static SerialHalfDuplex nPort;//common n bus 00053 00054 static DigitalOut sPort1ETx; // enable Tx for sPort 1 00055 static DigitalOut sPort2ETx; // enable Tx for sPort 2 00056 static DigitalOut nPortETx; // enable Tx for nPort 00057 static DigitalOut sPortETxs[S_FACES]; //seg ports enables in array format 00058 00059 static DigitalOut leds[]; 00060 00061 N4S2(){} 00062 00063 00064 protected: 00065 }; 00066 00067 #endif // bsp_h
Generated on Tue Aug 2 2022 11:35:56 by
1.7.2