Andrew Boyson / lpc1768

Dependents:   test-lpc1768 oldheating gps motorhome ... more

Committer:
andrewboyson
Date:
Fri Jun 03 11:51:13 2022 +0000
Revision:
71:2f8af23950de
Parent:
57:2590e393c164
Added can module

Who changed what in which revision?

UserRevisionLine numberNew contents of line
andrewboyson 57:2590e393c164 1 #pragma once
andrewboyson 57:2590e393c164 2
andrewboyson 27:5a8543940056 3 typedef int FILEHANDLE;
andrewboyson 27:5a8543940056 4
andrewboyson 29:1749efa34a64 5 typedef struct
andrewboyson 29:1749efa34a64 6 {
andrewboyson 29:1749efa34a64 7 unsigned char hr; /* Hours [0..23] */
andrewboyson 29:1749efa34a64 8 unsigned char min; /* Minutes [0..59] */
andrewboyson 29:1749efa34a64 9 unsigned char sec; /* Seconds [0..59] */
andrewboyson 29:1749efa34a64 10 unsigned char day; /* Day [1..31] */
andrewboyson 29:1749efa34a64 11 unsigned char mon; /* Month [1..12] */
andrewboyson 29:1749efa34a64 12 unsigned short year; /* Year [1980..2107] */
andrewboyson 29:1749efa34a64 13 } FTIME;
andrewboyson 29:1749efa34a64 14
andrewboyson 29:1749efa34a64 15 typedef struct
andrewboyson 29:1749efa34a64 16 { /* File Search info record */
andrewboyson 29:1749efa34a64 17 char name[32]; /* File name */
andrewboyson 29:1749efa34a64 18 long size; /* File size in bytes */
andrewboyson 29:1749efa34a64 19 int fileID; /* System File Identification */
andrewboyson 29:1749efa34a64 20 FTIME create_time; /* Date & time file was created */
andrewboyson 29:1749efa34a64 21 FTIME write_time; /* Date & time of last write */
andrewboyson 29:1749efa34a64 22 } XFINFO;
andrewboyson 29:1749efa34a64 23
andrewboyson 29:1749efa34a64 24 #define OPEN_MODE_R 0
andrewboyson 29:1749efa34a64 25 #define OPEN_MODE_B 1
andrewboyson 29:1749efa34a64 26 #define OPEN_MODE_PLUS 2
andrewboyson 29:1749efa34a64 27 #define OPEN_MODE_W 4
andrewboyson 29:1749efa34a64 28 #define OPEN_MODE_A 8
andrewboyson 29:1749efa34a64 29
andrewboyson 29:1749efa34a64 30 extern int SemihostXffind(const char *pattern, XFINFO *info);
andrewboyson 29:1749efa34a64 31 extern FILEHANDLE SemihostOpen (const char* name, int openmode);
andrewboyson 29:1749efa34a64 32 extern int SemihostClose (FILEHANDLE fh);
andrewboyson 29:1749efa34a64 33 extern int SemihostWrite (FILEHANDLE fh, const char* buffer, int length);
andrewboyson 29:1749efa34a64 34 extern int SemihostRead (FILEHANDLE fh, char* buffer, int length);
andrewboyson 32:f10bf577ece3 35 extern int SemihostSeek (FILEHANDLE fh, int position);
andrewboyson 29:1749efa34a64 36 extern int SemihostFlen (FILEHANDLE fh);
andrewboyson 29:1749efa34a64 37
andrewboyson 27:5a8543940056 38 extern int SemihostRemove(const char *name);
andrewboyson 27:5a8543940056 39 extern int SemihostRename(const char *old_name, const char *new_name);
andrewboyson 27:5a8543940056 40
andrewboyson 19:59e08130c950 41 extern void SemihostReset(void);
andrewboyson 19:59e08130c950 42 extern void SemihostMac(char* mac);