@@ -26,6 +26,15 @@ extern "C" {
2626#define randInt (min , max ) \
2727((unsigned)rand() % ((max) - (min) + 1) + (min))
2828
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+
2938/**
3039 * Gets a combination of the RTC time; useful for srand()
3140 */
@@ -104,7 +113,7 @@ extern "C" {
104113#define timer_2_Counter (*(volatile uint32_t*)0xF20010)
105114#define timer_1_ReloadValue (*(uint32_t*)0xF20004)
106115#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)
108117#define timer_1_MatchValue_2 (*(uint32_t*)0xF2000C)
109118#define timer_2_MatchValue_1 (*(uint32_t*)0xF20018)
110119#define timer_2_MatchValue_2 (*(uint32_t*)0xF2001C)
@@ -144,7 +153,7 @@ extern "C" {
144153(240)
145154
146155/**
147- * Total number of pixels in LCD
156+ * Total number of pixels in LCD
148157 */
149158#define LCD_SIZE \
150159(LCD_WIDTH*LCD_HEIGHT*2)
@@ -182,7 +191,7 @@ typedef struct { uint16_t len; char data[1]; } equ_t;
182191 */
183192typedef struct { uint16_t size ; uint8_t data [1 ]; } var_t ;
184193
185- /**
194+ /**
186195 * Gets an element from a matrix
187196 *
188197 * @param matrix Structure of matrix
@@ -192,12 +201,12 @@ typedef struct { uint16_t size; uint8_t data[1]; } var_t;
192201 */
193202#define matrix_element (matrix , row , col ) ((matrix)->items[(row)+(col)*(matrix)->rows])
194203
195- /**
204+ /**
196205 * Resets the OS homescreen; accounts for split screen
197206 */
198207#define os_ClrHome () do { _OS(asm_ClrLCD); _OS(asm_HomeUp); _OS(asm_DrawStatusBar); } while (0)
199208
200- /**
209+ /**
201210 * Resets the OS homescreen fully
202211 */
203212#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;
208217
209218/**
210219 * Sets the calculator's date
211- *
220+ *
212221 * Performs checks to ensure date is within range
213222 * @param day Day to set
214223 * @param month Month to set
@@ -218,7 +227,7 @@ void boot_SetDate(uint8_t day, uint8_t month, uint16_t year);
218227
219228/**
220229 * Gets the calculator's date
221- *
230+ *
222231 * @param day Pointer to variable to store day
223232 * @param month Pointer to variable to store month
224233 * @param year Pointer to variable to store year
@@ -227,7 +236,7 @@ void boot_GetDate(uint8_t *day, uint8_t *month, uint16_t *year);
227236
228237/**
229238 * Sets the calculator's time
230- *
239+ *
231240 * Performs checks to ensure time is within range
232241 * @param seconds Seconds to set
233242 * @param minutes Minutes to set
@@ -237,7 +246,7 @@ void boot_SetTime(uint8_t seconds, uint8_t minutes, uint8_t hours);
237246
238247/**
239248 * Gets the calculator's time
240- *
249+ *
241250 * @param seconds Pointer to variable to store seconds
242251 * @param minutes Pointer to variable to store minutes
243252 * @param hours Pointer to variable to store hours
@@ -278,7 +287,7 @@ void boot_ClearVRAM(void);
278287 */
279288bool boot_CheckOnPressed (void );
280289
281- /**
290+ /**
282291 * Basically a reimplemented form of printf that prints to some debugging device
283292 *
284293 * @param string String to send to debug device
@@ -444,7 +453,7 @@ uint8_t os_GetFlagByte(int offset);
444453
445454/**
446455 * Get amount of free ram in order to allocate extra ram
447- *
456+ *
448457 * @param free Set to start of free available ram
449458 * @returns Size of available ram
450459 */
@@ -570,7 +579,7 @@ real_t os_RealSub(const real_t *arg1, const real_t *arg2);
570579
571580/**
572581 * Rounds a real_t
573- *
582+ *
574583 * @note digits must be in the range 0 - 9
575584 */
576585real_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
628637
629638/**
630639 * This converts a ti-ascii string to a ti-float.
631- *
640+ *
632641 * String format regexp: / *[-\032+]?[0-9]*(\.[0-9]*)?([eE\033][-\032+]?[0-9]*)?/
633642 * @param string TI-ascii string to convert
634643 * @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);
645654
646655/**
647656 * Gets a key from the OS
648- *
657+ *
649658 * @returns Key code
650659 * @returns Extended key code in high byte
651660 */
@@ -664,7 +673,7 @@ typedef uint8_t sk_key_t;
664673 * 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";
665674 * uint8_t key, i = 0;
666675 * char buffer[50];
667- *
676+ *
668677 * while((key = os_GetCSC()) != sk_Enter) {
669678 * if(chars[key]) {
670679 * buffer[i++] = chars[key];
@@ -959,7 +968,7 @@ typedef enum {
959968#define os_Polar6LineColor (*(uint8_t*)0xD024ED)
960969#define os_SecULineColor (*(uint8_t*)0xD024EE)
961970#define os_SecVLineColor (*(uint8_t*)0xD024EF)
962- #define os_SecWLineColor (*(uint8_t*)0xD024F0)
971+ #define os_SecWLineColor (*(uint8_t*)0xD024F0)
963972
964973#define os_AppErr1 ((char*)0xD025A9) /**< String [1] for custom error */
965974#define os_AppErr2 ((char*)0xD025B6) /**< String [2] for custom error */
@@ -1560,7 +1569,7 @@ typedef enum {
15601569#define tXmax 0x0B
15611570#define tYmin 0x0C
15621571#define tYmax 0x0D
1563- #define tTmin 0x0E
1572+ #define tTmin 0x0E
15641573#define tTmax 0x0F
15651574#define tThetaMin 0x10
15661575#define tThetaMax 0x11
@@ -1939,4 +1948,3 @@ typedef enum {
19391948#endif
19401949
19411950#endif
1942-
0 commit comments