Skip to content

Commit e441d59

Browse files
fix fileioc items
Signed-off-by: mateoconlechuga <matthewwaltzis@gmail.com>
1 parent 9b73e77 commit e441d59

File tree

4 files changed

+23
-33
lines changed

4 files changed

+23
-33
lines changed

docs/conf.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,3 @@
5959
breathe_default_project = 'CE C/C++ Toolchain'
6060
subprocess.call('doxygen doxyfile', shell=True)
6161
breathe_projects['CE C/C++ Toolchain'] = 'doxygen/xml'
62-
63-
def check_conditional_assets(app, pagename, templatename, context, doctree):
64-
if pagename != 'libraries/fileioc':
65-
context["css_files"] = ['']
66-
67-
def setup(app):
68-
app.connect('html-page-context', check_conditional_assets)
69-
app.add_css_file('css/tables.css')

examples/fileioc/read_write/src/main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
int main(void)
66
{
77
char nameBuffer[10];
8-
ti_var_t var;
98
char string[] = "AppVar string";
9+
uint8_t var;
1010

1111
/* Clear the homescreen */
1212
os_ClrHome();

examples/fileioc/rename/src/main.c

Lines changed: 21 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -2,52 +2,57 @@
22
#include <ti/getcsc.h>
33
#include <fileioc.h>
44

5-
void PrintText(int8_t xpos, int8_t ypos, const char *text);
5+
static void PrintText(int8_t xpos, int8_t ypos, const char *text)
6+
{
7+
os_SetCursorPos(ypos, xpos);
8+
os_PutStrFull(text);
9+
}
610

711
int main(void)
812
{
913
/* Declare some variables */
1014
const char *oldName = "OldFile";
1115
const char *newName = "NewFile";
1216
char nameBuffer[10];
13-
ti_var_t file;
14-
bool error = true;
17+
uint8_t var;
18+
bool error;
1519

1620
/* Clear the homescreen */
1721
os_ClrHome();
1822

19-
/* Delete both the new and old files if they already exist */
23+
/* Delete both the new and old AppVars if they already exist */
2024
ti_Delete(oldName);
2125
ti_Delete(newName);
2226

27+
error = true;
2328
do
2429
{
25-
/* Create a file with the old name */
26-
file = ti_Open(oldName, "w");
27-
if (!file) break;
30+
/* Create an AppVar with the old name */
31+
var = ti_Open(oldName, "w");
32+
if (!var) break;
2833

29-
ti_GetName(nameBuffer, file);
34+
ti_GetName(nameBuffer, var);
3035
PrintText(0, 0, "Old Name: ");
3136
PrintText(10, 0, nameBuffer);
3237

33-
/* Rename the old file to the new file name */
38+
/* Rename the old AppVar to the new name */
3439
ti_Rename(oldName, newName);
3540

3641
/* Ensure that the slot is closed */
37-
ti_Close(file);
38-
file = 0;
42+
ti_Close(var);
43+
var = 0;
3944

4045
/* Ensure the new name of the file is correct */
41-
file = ti_Open(newName, "r");
42-
if (!file) break;
46+
var = ti_Open(newName, "r");
47+
if (!var) break;
4348

44-
ti_GetName(nameBuffer, file);
49+
ti_GetName(nameBuffer, var);
4550
PrintText(0, 1, "New Name: ");
4651
PrintText(10, 1, nameBuffer);
4752

4853
/* Ensure that the slot is closed */
49-
ti_Close(file);
50-
file = 0;
54+
ti_Close(var);
55+
var = 0;
5156

5257
error = false;
5358
} while (0);
@@ -63,10 +68,3 @@ int main(void)
6368

6469
return 0;
6570
}
66-
67-
/* Draw text on the homescreen at the given X/Y location */
68-
void PrintText(int8_t xpos, int8_t ypos, const char *text)
69-
{
70-
os_SetCursorPos(ypos, xpos);
71-
os_PutStrFull(text);
72-
}

examples/fileioc/tokens/src/main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
int main(void)
66
{
7-
ti_var_t prgm;
7+
uint8_t prgm;
88
void *data_ptr;
99
uint8_t token_length;
1010
uint16_t size;

0 commit comments

Comments
 (0)