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.
Dependencies: mbed
src/clocks.cpp@42:3ae73b61f657, 2019-03-09 (annotated)
- Committer:
- mfwic
- Date:
- Sat Mar 09 21:01:45 2019 +0000
- Revision:
- 42:3ae73b61f657
- Child:
- 47:d10bf65cb7dc
Removed V24, I24, I48.; Commented out en_out and wr_out.; Compiles
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| mfwic | 42:3ae73b61f657 | 1 | //------------------------------------------------------------------------------- |
| mfwic | 42:3ae73b61f657 | 2 | // |
| mfwic | 42:3ae73b61f657 | 3 | // Treehouse Inc. |
| mfwic | 42:3ae73b61f657 | 4 | // Colorado Springs, Colorado |
| mfwic | 42:3ae73b61f657 | 5 | // |
| mfwic | 42:3ae73b61f657 | 6 | // Copyright (c) 2016 by Treehouse Designs Inc. |
| mfwic | 42:3ae73b61f657 | 7 | // |
| mfwic | 42:3ae73b61f657 | 8 | // This code is the property of Treehouse, Inc. (Treehouse) and may not be redistributed |
| mfwic | 42:3ae73b61f657 | 9 | // in any form without prior written permission from the copyright holder, Treehouse. |
| mfwic | 42:3ae73b61f657 | 10 | // |
| mfwic | 42:3ae73b61f657 | 11 | // The above copyright notice and this permission notice shall be included in |
| mfwic | 42:3ae73b61f657 | 12 | // all copies or substantial portions of the Software. |
| mfwic | 42:3ae73b61f657 | 13 | // |
| mfwic | 42:3ae73b61f657 | 14 | //------------------------------------------------------------------------------- |
| mfwic | 42:3ae73b61f657 | 15 | // |
| mfwic | 42:3ae73b61f657 | 16 | // REVISION HISTORY: |
| mfwic | 42:3ae73b61f657 | 17 | // |
| mfwic | 42:3ae73b61f657 | 18 | // $Author: $ |
| mfwic | 42:3ae73b61f657 | 19 | // $Rev: $ |
| mfwic | 42:3ae73b61f657 | 20 | // $Date: $ |
| mfwic | 42:3ae73b61f657 | 21 | // $URL: $ |
| mfwic | 42:3ae73b61f657 | 22 | // |
| mfwic | 42:3ae73b61f657 | 23 | //------------------------------------------------------------------------------- |
| mfwic | 42:3ae73b61f657 | 24 | |
| mfwic | 42:3ae73b61f657 | 25 | #include "mbed.h" |
| mfwic | 42:3ae73b61f657 | 26 | #include "clocks.h" |
| mfwic | 42:3ae73b61f657 | 27 | #include "globals.h" |
| mfwic | 42:3ae73b61f657 | 28 | #include "Ticker.h" |
| mfwic | 42:3ae73b61f657 | 29 | #include "stdlib.h" |
| mfwic | 42:3ae73b61f657 | 30 | #include "all_io.h" |
| mfwic | 42:3ae73b61f657 | 31 | |
| mfwic | 42:3ae73b61f657 | 32 | |
| mfwic | 42:3ae73b61f657 | 33 | void initOut(void){ |
| mfwic | 42:3ae73b61f657 | 34 | ec2 = 1; |
| mfwic | 42:3ae73b61f657 | 35 | ec15 = 1; |
| mfwic | 42:3ae73b61f657 | 36 | ec26 = 1; |
| mfwic | 42:3ae73b61f657 | 37 | ec6 = 1; |
| mfwic | 42:3ae73b61f657 | 38 | ec12 = 1; |
| mfwic | 42:3ae73b61f657 | 39 | ec25 = 1; |
| mfwic | 42:3ae73b61f657 | 40 | ec36 = 1; |
| mfwic | 42:3ae73b61f657 | 41 | ec31 = 1; |
| mfwic | 42:3ae73b61f657 | 42 | ec9 = 1; |
| mfwic | 42:3ae73b61f657 | 43 | ec5 = 1; |
| mfwic | 42:3ae73b61f657 | 44 | ec24 = 1; |
| mfwic | 42:3ae73b61f657 | 45 | ec11 = 1; |
| mfwic | 42:3ae73b61f657 | 46 | ec1 = 1; |
| mfwic | 42:3ae73b61f657 | 47 | ec10 = 1; |
| mfwic | 42:3ae73b61f657 | 48 | ec23 = 1; |
| mfwic | 42:3ae73b61f657 | 49 | ec7 = 1; |
| mfwic | 42:3ae73b61f657 | 50 | ec18 = 1; |
| mfwic | 42:3ae73b61f657 | 51 | ec14 = 1; |
| mfwic | 42:3ae73b61f657 | 52 | ec27 = 1; |
| mfwic | 42:3ae73b61f657 | 53 | ec19 = 1; |
| mfwic | 42:3ae73b61f657 | 54 | ec32 = 1; |
| mfwic | 42:3ae73b61f657 | 55 | ec35 = 1; |
| mfwic | 42:3ae73b61f657 | 56 | ec21 = 1; |
| mfwic | 42:3ae73b61f657 | 57 | ec30 = 1; |
| mfwic | 42:3ae73b61f657 | 58 | ec33 = 1; |
| mfwic | 42:3ae73b61f657 | 59 | ec20 = 1; |
| mfwic | 42:3ae73b61f657 | 60 | ec34 = 1; |
| mfwic | 42:3ae73b61f657 | 61 | ec29 = 1; |
| mfwic | 42:3ae73b61f657 | 62 | ec8 = 1; |
| mfwic | 42:3ae73b61f657 | 63 | ec4 = 1; |
| mfwic | 42:3ae73b61f657 | 64 | ec17 = 1; |
| mfwic | 42:3ae73b61f657 | 65 | ec13 = 1; |
| mfwic | 42:3ae73b61f657 | 66 | ec26 = 1; |
| mfwic | 42:3ae73b61f657 | 67 | ec22 = 1; |
| mfwic | 42:3ae73b61f657 | 68 | } |
| mfwic | 42:3ae73b61f657 | 69 | |
| mfwic | 42:3ae73b61f657 | 70 | void flipSlow(void){ |
| mfwic | 42:3ae73b61f657 | 71 | dosFlip = FALSE; |
| mfwic | 42:3ae73b61f657 | 72 | if(!ILR_enable){ |
| mfwic | 42:3ae73b61f657 | 73 | ec2 = !ec2; |
| mfwic | 42:3ae73b61f657 | 74 | ec15 = !ec15; |
| mfwic | 42:3ae73b61f657 | 75 | ec26 = !ec26; |
| mfwic | 42:3ae73b61f657 | 76 | ec6 = !ec6; |
| mfwic | 42:3ae73b61f657 | 77 | ec12 = !ec12; |
| mfwic | 42:3ae73b61f657 | 78 | ec25 = !ec25; |
| mfwic | 42:3ae73b61f657 | 79 | ec36 = !ec36; |
| mfwic | 42:3ae73b61f657 | 80 | ec31 = !ec31; |
| mfwic | 42:3ae73b61f657 | 81 | ec9 = !ec9; |
| mfwic | 42:3ae73b61f657 | 82 | ec5 = !ec5; |
| mfwic | 42:3ae73b61f657 | 83 | ec24 = !ec24; |
| mfwic | 42:3ae73b61f657 | 84 | ec11 = !ec11; |
| mfwic | 42:3ae73b61f657 | 85 | ec1 = !ec1; |
| mfwic | 42:3ae73b61f657 | 86 | ec10 = !ec10; |
| mfwic | 42:3ae73b61f657 | 87 | ec23 = !ec23; |
| mfwic | 42:3ae73b61f657 | 88 | ec7 = !ec7; |
| mfwic | 42:3ae73b61f657 | 89 | ec18 = !ec18; |
| mfwic | 42:3ae73b61f657 | 90 | ec14 = !ec14; |
| mfwic | 42:3ae73b61f657 | 91 | ec27 = !ec27; |
| mfwic | 42:3ae73b61f657 | 92 | ec19 = !ec19; |
| mfwic | 42:3ae73b61f657 | 93 | ec32 = !ec32; |
| mfwic | 42:3ae73b61f657 | 94 | ec35 = !ec35; |
| mfwic | 42:3ae73b61f657 | 95 | ec21 = !ec21; |
| mfwic | 42:3ae73b61f657 | 96 | ec30 = !ec30; |
| mfwic | 42:3ae73b61f657 | 97 | ec33 = !ec33; |
| mfwic | 42:3ae73b61f657 | 98 | ec20 = !ec20; |
| mfwic | 42:3ae73b61f657 | 99 | ec34 = !ec34; |
| mfwic | 42:3ae73b61f657 | 100 | ec29 = !ec29; |
| mfwic | 42:3ae73b61f657 | 101 | ec8 = !ec8; |
| mfwic | 42:3ae73b61f657 | 102 | ec4 = !ec4; |
| mfwic | 42:3ae73b61f657 | 103 | ec17 = !ec17; |
| mfwic | 42:3ae73b61f657 | 104 | ec13 = !ec13; |
| mfwic | 42:3ae73b61f657 | 105 | ec26 = !ec26; |
| mfwic | 42:3ae73b61f657 | 106 | ec22 = !ec22; |
| mfwic | 42:3ae73b61f657 | 107 | } |
| mfwic | 42:3ae73b61f657 | 108 | } |
| mfwic | 42:3ae73b61f657 | 109 | |
| mfwic | 42:3ae73b61f657 | 110 | void flipFast(void){ |
| mfwic | 42:3ae73b61f657 | 111 | dofFlip = FALSE; |
| mfwic | 42:3ae73b61f657 | 112 | if(ILR_enable){ |
| mfwic | 42:3ae73b61f657 | 113 | ec2 = !ec2; |
| mfwic | 42:3ae73b61f657 | 114 | ec15 = !ec15; |
| mfwic | 42:3ae73b61f657 | 115 | ec26 = !ec26; |
| mfwic | 42:3ae73b61f657 | 116 | ec6 = !ec6; |
| mfwic | 42:3ae73b61f657 | 117 | ec12 = !ec12; |
| mfwic | 42:3ae73b61f657 | 118 | ec25 = !ec25; |
| mfwic | 42:3ae73b61f657 | 119 | ec36 = !ec36; |
| mfwic | 42:3ae73b61f657 | 120 | ec31 = !ec31; |
| mfwic | 42:3ae73b61f657 | 121 | ec9 = !ec9; |
| mfwic | 42:3ae73b61f657 | 122 | ec5 = !ec5; |
| mfwic | 42:3ae73b61f657 | 123 | ec24 = !ec24; |
| mfwic | 42:3ae73b61f657 | 124 | ec11 = !ec11; |
| mfwic | 42:3ae73b61f657 | 125 | ec1 = !ec1; |
| mfwic | 42:3ae73b61f657 | 126 | ec10 = !ec10; |
| mfwic | 42:3ae73b61f657 | 127 | ec23 = !ec23; |
| mfwic | 42:3ae73b61f657 | 128 | ec7 = !ec7; |
| mfwic | 42:3ae73b61f657 | 129 | ec18 = !ec18; |
| mfwic | 42:3ae73b61f657 | 130 | ec14 = !ec14; |
| mfwic | 42:3ae73b61f657 | 131 | ec27 = !ec27; |
| mfwic | 42:3ae73b61f657 | 132 | ec19 = !ec19; |
| mfwic | 42:3ae73b61f657 | 133 | ec32 = !ec32; |
| mfwic | 42:3ae73b61f657 | 134 | ec35 = !ec35; |
| mfwic | 42:3ae73b61f657 | 135 | ec21 = !ec21; |
| mfwic | 42:3ae73b61f657 | 136 | ec30 = !ec30; |
| mfwic | 42:3ae73b61f657 | 137 | ec33 = !ec33; |
| mfwic | 42:3ae73b61f657 | 138 | ec20 = !ec20; |
| mfwic | 42:3ae73b61f657 | 139 | ec34 = !ec34; |
| mfwic | 42:3ae73b61f657 | 140 | ec29 = !ec29; |
| mfwic | 42:3ae73b61f657 | 141 | ec8 = !ec8; |
| mfwic | 42:3ae73b61f657 | 142 | ec4 = !ec4; |
| mfwic | 42:3ae73b61f657 | 143 | ec17 = !ec17; |
| mfwic | 42:3ae73b61f657 | 144 | ec13 = !ec13; |
| mfwic | 42:3ae73b61f657 | 145 | ec26 = !ec26; |
| mfwic | 42:3ae73b61f657 | 146 | ec22 = !ec22; |
| mfwic | 42:3ae73b61f657 | 147 | } |
| mfwic | 42:3ae73b61f657 | 148 | } |
| mfwic | 42:3ae73b61f657 | 149 | |
| mfwic | 42:3ae73b61f657 | 150 | void checkFlip(void){ |
| mfwic | 42:3ae73b61f657 | 151 | if(dosFlip){ |
| mfwic | 42:3ae73b61f657 | 152 | flipSlow(); |
| mfwic | 42:3ae73b61f657 | 153 | } |
| mfwic | 42:3ae73b61f657 | 154 | if(dofFlip){ |
| mfwic | 42:3ae73b61f657 | 155 | flipFast(); |
| mfwic | 42:3ae73b61f657 | 156 | } |
| mfwic | 42:3ae73b61f657 | 157 | } |