@@ -26,6 +26,15 @@ extern "C" {
26
26
#define randInt (min , max ) \
27
27
((unsigned)rand() % ((max) - (min) + 1) + (min))
28
28
29
+ /**
30
+ * Delays for a number of milliseconds.
31
+ * <p>
32
+ * Counts time spent while interrupted. Assumes a CPU clock speed of 48MHz.
33
+ *
34
+ * @param msec number of milliseconds
35
+ */
36
+ void delay (uint16_t msec );
37
+
29
38
/**
30
39
* Gets a combination of the RTC time; useful for srand()
31
40
*/
@@ -104,7 +113,7 @@ extern "C" {
104
113
#define timer_2_Counter (*(volatile uint32_t*)0xF20010)
105
114
#define timer_1_ReloadValue (*(uint32_t*)0xF20004)
106
115
#define timer_2_ReloadValue (*(uint32_t*)0xF20014)
107
- #define timer_1_MatchValue_1 (*(uint32_t*)0xF20008)
116
+ #define timer_1_MatchValue_1 (*(uint32_t*)0xF20008)
108
117
#define timer_1_MatchValue_2 (*(uint32_t*)0xF2000C)
109
118
#define timer_2_MatchValue_1 (*(uint32_t*)0xF20018)
110
119
#define timer_2_MatchValue_2 (*(uint32_t*)0xF2001C)
@@ -144,7 +153,7 @@ extern "C" {
144
153
(240)
145
154
146
155
/**
147
- * Total number of pixels in LCD
156
+ * Total number of pixels in LCD
148
157
*/
149
158
#define LCD_SIZE \
150
159
(LCD_WIDTH*LCD_HEIGHT*2)
@@ -182,7 +191,7 @@ typedef struct { uint16_t len; char data[1]; } equ_t;
182
191
*/
183
192
typedef struct { uint16_t size ; uint8_t data [1 ]; } var_t ;
184
193
185
- /**
194
+ /**
186
195
* Gets an element from a matrix
187
196
*
188
197
* @param matrix Structure of matrix
@@ -192,12 +201,12 @@ typedef struct { uint16_t size; uint8_t data[1]; } var_t;
192
201
*/
193
202
#define matrix_element (matrix , row , col ) ((matrix)->items[(row)+(col)*(matrix)->rows])
194
203
195
- /**
204
+ /**
196
205
* Resets the OS homescreen; accounts for split screen
197
206
*/
198
207
#define os_ClrHome () do { _OS(asm_ClrLCD); _OS(asm_HomeUp); _OS(asm_DrawStatusBar); } while (0)
199
208
200
- /**
209
+ /**
201
210
* Resets the OS homescreen fully
202
211
*/
203
212
#define os_ClrHomeFull () do { _OS(asm_ClrLCDFull); _OS(asm_HomeUp); _OS(asm_DrawStatusBar); } while (0)
@@ -208,7 +217,7 @@ typedef struct { uint16_t size; uint8_t data[1]; } var_t;
208
217
209
218
/**
210
219
* Sets the calculator's date
211
- *
220
+ *
212
221
* Performs checks to ensure date is within range
213
222
* @param day Day to set
214
223
* @param month Month to set
@@ -218,7 +227,7 @@ void boot_SetDate(uint8_t day, uint8_t month, uint16_t year);
218
227
219
228
/**
220
229
* Gets the calculator's date
221
- *
230
+ *
222
231
* @param day Pointer to variable to store day
223
232
* @param month Pointer to variable to store month
224
233
* @param year Pointer to variable to store year
@@ -227,7 +236,7 @@ void boot_GetDate(uint8_t *day, uint8_t *month, uint16_t *year);
227
236
228
237
/**
229
238
* Sets the calculator's time
230
- *
239
+ *
231
240
* Performs checks to ensure time is within range
232
241
* @param seconds Seconds to set
233
242
* @param minutes Minutes to set
@@ -237,7 +246,7 @@ void boot_SetTime(uint8_t seconds, uint8_t minutes, uint8_t hours);
237
246
238
247
/**
239
248
* Gets the calculator's time
240
- *
249
+ *
241
250
* @param seconds Pointer to variable to store seconds
242
251
* @param minutes Pointer to variable to store minutes
243
252
* @param hours Pointer to variable to store hours
@@ -278,7 +287,7 @@ void boot_ClearVRAM(void);
278
287
*/
279
288
bool boot_CheckOnPressed (void );
280
289
281
- /**
290
+ /**
282
291
* Basically a reimplemented form of printf that prints to some debugging device
283
292
*
284
293
* @param string String to send to debug device
@@ -444,7 +453,7 @@ uint8_t os_GetFlagByte(int offset);
444
453
445
454
/**
446
455
* Get amount of free ram in order to allocate extra ram
447
- *
456
+ *
448
457
* @param free Set to start of free available ram
449
458
* @returns Size of available ram
450
459
*/
@@ -570,7 +579,7 @@ real_t os_RealSub(const real_t *arg1, const real_t *arg2);
570
579
571
580
/**
572
581
* Rounds a real_t
573
- *
582
+ *
574
583
* @note digits must be in the range 0 - 9
575
584
*/
576
585
real_t os_RealRound (const real_t * arg , char digits );
@@ -628,7 +637,7 @@ int os_RealToStr(char *result, const real_t *arg, int8_t maxLength, uint8_t mode
628
637
629
638
/**
630
639
* This converts a ti-ascii string to a ti-float.
631
- *
640
+ *
632
641
* String format regexp: / *[-\032+]?[0-9]*(\.[0-9]*)?([eE\033][-\032+]?[0-9]*)?/
633
642
* @param string TI-ascii string to convert
634
643
* @param end If non-null, pointer to end of parsed number is stored here
@@ -645,7 +654,7 @@ void os_ResetFlagBits(int16_t offset_pattern);
645
654
646
655
/**
647
656
* Gets a key from the OS
648
- *
657
+ *
649
658
* @returns Key code
650
659
* @returns Extended key code in high byte
651
660
*/
@@ -664,7 +673,7 @@ typedef uint8_t sk_key_t;
664
673
* const char *chars = "\0\0\0\0\0\0\0\0\0\0\"WRMH\0\0?[VQLG\0\0:ZUPKFC\0 YTOJEB\0\0XSNIDA\0\0\0\0\0\0\0\0";
665
674
* uint8_t key, i = 0;
666
675
* char buffer[50];
667
- *
676
+ *
668
677
* while((key = os_GetCSC()) != sk_Enter) {
669
678
* if(chars[key]) {
670
679
* buffer[i++] = chars[key];
@@ -959,7 +968,7 @@ typedef enum {
959
968
#define os_Polar6LineColor (*(uint8_t*)0xD024ED)
960
969
#define os_SecULineColor (*(uint8_t*)0xD024EE)
961
970
#define os_SecVLineColor (*(uint8_t*)0xD024EF)
962
- #define os_SecWLineColor (*(uint8_t*)0xD024F0)
971
+ #define os_SecWLineColor (*(uint8_t*)0xD024F0)
963
972
964
973
#define os_AppErr1 ((char*)0xD025A9) /**< String [1] for custom error */
965
974
#define os_AppErr2 ((char*)0xD025B6) /**< String [2] for custom error */
@@ -1560,7 +1569,7 @@ typedef enum {
1560
1569
#define tXmax 0x0B
1561
1570
#define tYmin 0x0C
1562
1571
#define tYmax 0x0D
1563
- #define tTmin 0x0E
1572
+ #define tTmin 0x0E
1564
1573
#define tTmax 0x0F
1565
1574
#define tThetaMin 0x10
1566
1575
#define tThetaMax 0x11
@@ -1939,4 +1948,3 @@ typedef enum {
1939
1948
#endif
1940
1949
1941
1950
#endif
1942
-
0 commit comments