No changes between revisions
/Designs/Data_loggers/DOGFINDER01A/PrjInfo.txt |
---|
0,0 → 1,18 |
// |
// Toto je popisný soubor pro popis obsahu adresáře (příklad) |
// |
[InfoShortDescription.en] |
Dog finder - Track Logger |
[InfoShortDescription.cs] |
Psí vyhledávač - záznamník trasy |
[InfoLongDescription.en] |
The track is logged in NMEA format on SD/MMC card. |
[InfoLongDescription.cs] |
Umožňuje zaznamanat trasu opakovaně utíkajícího psa. A tím nalézt zdroj problémů, například díru v plotě :) |
Trasa je zaznamenávána na SD/MMC kartu ve formátu NMEA. |
[End] |
/Designs/Data_loggers/DOGFINDER01A/SW/ATMEGA168/Makefile |
---|
0,0 → 1,52 |
PRG = glg |
OBJ = main.o tff.o mmc.o |
MCU_TARGET = atmega168 |
OPTIMIZE = -Os -mcall-prologues |
DEFS = |
LIBS = |
DEBUG = dwarf-2 |
CC = avr-gcc |
ASFLAGS = -Wa,-adhlns=$(<:.S=.lst),-gstabs |
ALL_ASFLAGS = -mmcu=$(MCU_TARGET) -I. -x assembler-with-cpp $(ASFLAGS) |
CFLAGS = -g$(DEBUG) -Wall $(OPTIMIZE) -mmcu=$(MCU_TARGET) $(DEFS) |
LDFLAGS = -Wl,-Map,$(PRG).map |
OBJCOPY = avr-objcopy |
OBJDUMP = avr-objdump |
SIZE = avr-size |
all: $(PRG).elf lst text size |
$(PRG).elf: $(OBJ) |
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS) |
clean: |
rm -rf *.o $(PRG).elf *.eps *.bak *.a |
rm -rf *.lst *.map $(EXTRA_CLEAN_FILES) |
rm -rf $(PRG).hex |
size: $(PRG).elf |
$(SIZE) $(PRG).elf |
lst: $(PRG).lst |
%.lst: %.elf |
$(OBJDUMP) -h -S $< > $@ |
%.o : %.S |
$(CC) -c $(ALL_ASFLAGS) $< -o $@ |
text: hex |
hex: $(PRG).hex |
%.hex: %.elf |
$(OBJCOPY) -j .text -j .data -O ihex $< $@ |
/Designs/Data_loggers/DOGFINDER01A/SW/ATMEGA168/diskio.h |
---|
0,0 → 1,64 |
/*----------------------------------------------------------------------- |
/ Low level disk interface modlue include file R0.04a (C)ChaN, 2007 |
/-----------------------------------------------------------------------*/ |
#ifndef _DISKIO |
#define _READONLY 0 /* 1: Read-only mode */ |
#include "integer.h" |
/* Status of Disk Functions */ |
typedef BYTE DSTATUS; |
/* Results of Disk Functions */ |
typedef enum { |
RES_OK = 0, /* 0: Successful */ |
RES_ERROR, /* 1: R/W Error */ |
RES_WRPRT, /* 2: Write Protected */ |
RES_NOTRDY, /* 3: Not Ready */ |
RES_PARERR /* 4: Invalid Parameter */ |
} DRESULT; |
/*---------------------------------------*/ |
/* Prototypes for disk control functions */ |
DSTATUS disk_initialize (BYTE); |
DSTATUS disk_status (BYTE); |
DRESULT disk_read (BYTE, BYTE*, DWORD, BYTE); |
#if _READONLY == 0 |
DRESULT disk_write (BYTE, const BYTE*, DWORD, BYTE); |
#endif |
DRESULT disk_ioctl (BYTE, BYTE, void*); |
void disk_timerproc (void); |
/* Disk Status Bits (DSTATUS) */ |
#define STA_NOINIT 0x01 /* Drive not initialized */ |
#define STA_NODISK 0x02 /* No medium in the drive */ |
#define STA_PROTECT 0x04 /* Write protected */ |
/* Command code for disk_ioctrl() */ |
#define GET_SECTOR_COUNT 1 |
#define GET_SECTOR_SIZE 2 |
#define CTRL_SYNC 3 |
#define CTRL_POWER 4 |
#define CTRL_LOCK 5 |
#define CTRL_EJECT 6 |
#define MMC_GET_CSD 10 |
#define MMC_GET_CID 11 |
#define MMC_GET_OCR 12 |
#define ATA_GET_REV 20 |
#define ATA_GET_MODEL 21 |
#define ATA_GET_SN 22 |
#define _DISKIO |
#endif |
/Designs/Data_loggers/DOGFINDER01A/SW/ATMEGA168/ff.c |
---|
0,0 → 1,2036 |
/*----------------------------------------------------------------------------/ |
/ FatFs - FAT file system module R0.06 (C)ChaN, 2008 |
/-----------------------------------------------------------------------------/ |
/ The FatFs module is an experimenal project to implement FAT file system to |
/ cheap microcontrollers. This is a free software and is opened for education, |
/ research and development under license policy of following trems. |
/ |
/ Copyright (C) 2008, ChaN, all right reserved. |
/ |
/ * The FatFs module is a free software and there is no warranty. |
/ * You can use, modify and/or redistribute it for personal, non-profit or |
/ commercial use without restriction under your responsibility. |
/ * Redistributions of source code must retain the above copyright notice. |
/ |
/-----------------------------------------------------------------------------/ |
/ Feb 26,'06 R0.00 Prototype. |
/ |
/ Apr 29,'06 R0.01 First stable version. |
/ |
/ Jun 01,'06 R0.02 Added FAT12 support. |
/ Removed unbuffered mode. |
/ Fixed a problem on small (<32M) patition. |
/ Jun 10,'06 R0.02a Added a configuration option (_FS_MINIMUM). |
/ |
/ Sep 22,'06 R0.03 Added f_rename(). |
/ Changed option _FS_MINIMUM to _FS_MINIMIZE. |
/ Dec 11,'06 R0.03a Improved cluster scan algolithm to write files fast. |
/ Fixed f_mkdir() creates incorrect directory on FAT32. |
/ |
/ Feb 04,'07 R0.04 Supported multiple drive system. |
/ Changed some interfaces for multiple drive system. |
/ Changed f_mountdrv() to f_mount(). |
/ Added f_mkfs(). |
/ Apr 01,'07 R0.04a Supported multiple partitions on a plysical drive. |
/ Added a capability of extending file size to f_lseek(). |
/ Added minimization level 3. |
/ Fixed an endian sensitive code in f_mkfs(). |
/ May 05,'07 R0.04b Added a configuration option _USE_NTFLAG. |
/ Added FSInfo support. |
/ Fixed DBCS name can result FR_INVALID_NAME. |
/ Fixed short seek (<= csize) collapses the file object. |
/ |
/ Aug 25,'07 R0.05 Changed arguments of f_read(), f_write() and f_mkfs(). |
/ Fixed f_mkfs() on FAT32 creates incorrect FSInfo. |
/ Fixed f_mkdir() on FAT32 creates incorrect directory. |
/ Feb 03,'08 R0.05a Added f_truncate() and f_utime(). |
/ Fixed off by one error at FAT sub-type determination. |
/ Fixed btr in f_read() can be mistruncated. |
/ Fixed cached sector is not flushed when create and close |
/ without write. |
/ |
/ Apr 01,'08 R0.06 Added fputc(), fputs(), fprintf() and fgets(). |
/ Improved performance of f_lseek() on moving to the same |
/ or following cluster. |
/---------------------------------------------------------------------------*/ |
#include <string.h> |
#include "ff.h" /* FatFs declarations */ |
#include "diskio.h" /* Include file for user provided disk functions */ |
/*-------------------------------------------------------------------------- |
Module Private Functions |
---------------------------------------------------------------------------*/ |
static |
FATFS *FatFs[_DRIVES]; /* Pointer to the file system objects (logical drives) */ |
static |
WORD fsid; /* File system mount ID */ |
/*-----------------------------------------------------------------------*/ |
/* Change window offset */ |
/*-----------------------------------------------------------------------*/ |
static |
BOOL move_window ( /* TRUE: successful, FALSE: failed */ |
FATFS *fs, /* File system object */ |
DWORD sector /* Sector number to make apperance in the fs->win[] */ |
) /* Move to zero only writes back dirty window */ |
{ |
DWORD wsect; |
wsect = fs->winsect; |
if (wsect != sector) { /* Changed current window */ |
#if !_FS_READONLY |
BYTE n; |
if (fs->winflag) { /* Write back dirty window if needed */ |
if (disk_write(fs->drive, fs->win, wsect, 1) != RES_OK) |
return FALSE; |
fs->winflag = 0; |
if (wsect < (fs->fatbase + fs->sects_fat)) { /* In FAT area */ |
for (n = fs->n_fats; n >= 2; n--) { /* Refrect the change to FAT copy */ |
wsect += fs->sects_fat; |
disk_write(fs->drive, fs->win, wsect, 1); |
} |
} |
} |
#endif |
if (sector) { |
if (disk_read(fs->drive, fs->win, sector, 1) != RES_OK) |
return FALSE; |
fs->winsect = sector; |
} |
} |
return TRUE; |
} |
/*-----------------------------------------------------------------------*/ |
/* Clean-up cached data */ |
/*-----------------------------------------------------------------------*/ |
#if !_FS_READONLY |
static |
FRESULT sync ( /* FR_OK: successful, FR_RW_ERROR: failed */ |
FATFS *fs /* File system object */ |
) |
{ |
fs->winflag = 1; |
if (!move_window(fs, 0)) return FR_RW_ERROR; |
#if _USE_FSINFO |
/* Update FSInfo sector if needed */ |
if (fs->fs_type == FS_FAT32 && fs->fsi_flag) { |
fs->winsect = 0; |
memset(fs->win, 0, 512); |
ST_WORD(&fs->win[BS_55AA], 0xAA55); |
ST_DWORD(&fs->win[FSI_LeadSig], 0x41615252); |
ST_DWORD(&fs->win[FSI_StrucSig], 0x61417272); |
ST_DWORD(&fs->win[FSI_Free_Count], fs->free_clust); |
ST_DWORD(&fs->win[FSI_Nxt_Free], fs->last_clust); |
disk_write(fs->drive, fs->win, fs->fsi_sector, 1); |
fs->fsi_flag = 0; |
} |
#endif |
/* Make sure that no pending write process in the physical drive */ |
if (disk_ioctl(fs->drive, CTRL_SYNC, NULL) != RES_OK) |
return FR_RW_ERROR; |
return FR_OK; |
} |
#endif |
/*-----------------------------------------------------------------------*/ |
/* Get a cluster status */ |
/*-----------------------------------------------------------------------*/ |
static |
DWORD get_cluster ( /* 0,>=2: successful, 1: failed */ |
FATFS *fs, /* File system object */ |
DWORD clust /* Cluster# to get the link information */ |
) |
{ |
WORD wc, bc; |
DWORD fatsect; |
if (clust >= 2 && clust < fs->max_clust) { /* Is it a valid cluster#? */ |
fatsect = fs->fatbase; |
switch (fs->fs_type) { |
case FS_FAT12 : |
bc = (WORD)clust * 3 / 2; |
if (!move_window(fs, fatsect + (bc / SS(fs)))) break; |
wc = fs->win[bc & (SS(fs) - 1)]; bc++; |
if (!move_window(fs, fatsect + (bc / SS(fs)))) break; |
wc |= (WORD)fs->win[bc & (SS(fs) - 1)] << 8; |
return (clust & 1) ? (wc >> 4) : (wc & 0xFFF); |
case FS_FAT16 : |
if (!move_window(fs, fatsect + (clust / (SS(fs) / 2)))) break; |
return LD_WORD(&fs->win[((WORD)clust * 2) & (SS(fs) - 1)]); |
case FS_FAT32 : |
if (!move_window(fs, fatsect + (clust / (SS(fs) / 4)))) break; |
return LD_DWORD(&fs->win[((WORD)clust * 4) & (SS(fs) - 1)]) & 0x0FFFFFFF; |
} |
} |
return 1; /* Out of cluster range, or an error occured */ |
} |
/*-----------------------------------------------------------------------*/ |
/* Change a cluster status */ |
/*-----------------------------------------------------------------------*/ |
#if !_FS_READONLY |
static |
BOOL put_cluster ( /* TRUE: successful, FALSE: failed */ |
FATFS *fs, /* File system object */ |
DWORD clust, /* Cluster# to change (must be 2 to fs->max_clust-1) */ |
DWORD val /* New value to mark the cluster */ |
) |
{ |
WORD bc; |
BYTE *p; |
DWORD fatsect; |
fatsect = fs->fatbase; |
switch (fs->fs_type) { |
case FS_FAT12 : |
bc = (WORD)clust * 3 / 2; |
if (!move_window(fs, fatsect + (bc / SS(fs)))) return FALSE; |
p = &fs->win[bc & (SS(fs) - 1)]; |
*p = (clust & 1) ? ((*p & 0x0F) | ((BYTE)val << 4)) : (BYTE)val; |
bc++; |
fs->winflag = 1; |
if (!move_window(fs, fatsect + (bc / SS(fs)))) return FALSE; |
p = &fs->win[bc & (SS(fs) - 1)]; |
*p = (clust & 1) ? (BYTE)(val >> 4) : ((*p & 0xF0) | ((BYTE)(val >> 8) & 0x0F)); |
break; |
case FS_FAT16 : |
if (!move_window(fs, fatsect + (clust / (SS(fs) / 2)))) return FALSE; |
ST_WORD(&fs->win[((WORD)clust * 2) & (SS(fs) - 1)], (WORD)val); |
break; |
case FS_FAT32 : |
if (!move_window(fs, fatsect + (clust / (SS(fs) / 4)))) return FALSE; |
ST_DWORD(&fs->win[((WORD)clust * 4) & (SS(fs) - 1)], val); |
break; |
default : |
return FALSE; |
} |
fs->winflag = 1; |
return TRUE; |
} |
#endif /* !_FS_READONLY */ |
/*-----------------------------------------------------------------------*/ |
/* Remove a cluster chain */ |
/*-----------------------------------------------------------------------*/ |
#if !_FS_READONLY |
static |
BOOL remove_chain ( /* TRUE: successful, FALSE: failed */ |
FATFS *fs, /* File system object */ |
DWORD clust /* Cluster# to remove chain from */ |
) |
{ |
DWORD nxt; |
while (clust >= 2 && clust < fs->max_clust) { |
nxt = get_cluster(fs, clust); |
if (nxt == 1) return FALSE; |
if (!put_cluster(fs, clust, 0)) return FALSE; |
if (fs->free_clust != 0xFFFFFFFF) { |
fs->free_clust++; |
#if _USE_FSINFO |
fs->fsi_flag = 1; |
#endif |
} |
clust = nxt; |
} |
return TRUE; |
} |
#endif |
/*-----------------------------------------------------------------------*/ |
/* Stretch or create a cluster chain */ |
/*-----------------------------------------------------------------------*/ |
#if !_FS_READONLY |
static |
DWORD create_chain ( /* 0: No free cluster, 1: Error, >=2: New cluster number */ |
FATFS *fs, /* File system object */ |
DWORD clust /* Cluster# to stretch, 0 means create new */ |
) |
{ |
DWORD cstat, ncl, scl, mcl = fs->max_clust; |
if (clust == 0) { /* Create new chain */ |
scl = fs->last_clust; /* Get suggested start point */ |
if (scl == 0 || scl >= mcl) scl = 1; |
} |
else { /* Stretch existing chain */ |
cstat = get_cluster(fs, clust); /* Check the cluster status */ |
if (cstat < 2) return 1; /* It is an invalid cluster */ |
if (cstat < mcl) return cstat; /* It is already followed by next cluster */ |
scl = clust; |
} |
ncl = scl; /* Start cluster */ |
for (;;) { |
ncl++; /* Next cluster */ |
if (ncl >= mcl) { /* Wrap around */ |
ncl = 2; |
if (ncl > scl) return 0; /* No free custer */ |
} |
cstat = get_cluster(fs, ncl); /* Get the cluster status */ |
if (cstat == 0) break; /* Found a free cluster */ |
if (cstat == 1) return 1; /* Any error occured */ |
if (ncl == scl) return 0; /* No free custer */ |
} |
if (!put_cluster(fs, ncl, 0x0FFFFFFF)) return 1; /* Mark the new cluster "in use" */ |
if (clust != 0 && !put_cluster(fs, clust, ncl)) return 1; /* Link it to previous one if needed */ |
fs->last_clust = ncl; /* Update fsinfo */ |
if (fs->free_clust != 0xFFFFFFFF) { |
fs->free_clust--; |
#if _USE_FSINFO |
fs->fsi_flag = 1; |
#endif |
} |
return ncl; /* Return new cluster number */ |
} |
#endif /* !_FS_READONLY */ |
/*-----------------------------------------------------------------------*/ |
/* Get sector# from cluster# */ |
/*-----------------------------------------------------------------------*/ |
static |
DWORD clust2sect ( /* !=0: sector number, 0: failed - invalid cluster# */ |
FATFS *fs, /* File system object */ |
DWORD clust /* Cluster# to be converted */ |
) |
{ |
clust -= 2; |
if (clust >= (fs->max_clust - 2)) return 0; /* Invalid cluster# */ |
return clust * fs->csize + fs->database; |
} |
/*-----------------------------------------------------------------------*/ |
/* Move directory pointer to next */ |
/*-----------------------------------------------------------------------*/ |
static |
BOOL next_dir_entry ( /* TRUE: successful, FALSE: could not move next */ |
DIR *dj /* Pointer to directory object */ |
) |
{ |
DWORD clust; |
WORD idx; |
idx = dj->index + 1; |
if ((idx & ((SS(dj->fs) - 1) / 32)) == 0) { /* Table sector changed? */ |
dj->sect++; /* Next sector */ |
if (dj->clust == 0) { /* In static table */ |
if (idx >= dj->fs->n_rootdir) return FALSE; /* Reached to end of table */ |
} else { /* In dynamic table */ |
if (((idx / (SS(dj->fs) / 32)) & (dj->fs->csize - 1)) == 0) { /* Cluster changed? */ |
clust = get_cluster(dj->fs, dj->clust); /* Get next cluster */ |
if (clust < 2 || clust >= dj->fs->max_clust) /* Reached to end of table */ |
return FALSE; |
dj->clust = clust; /* Initialize for new cluster */ |
dj->sect = clust2sect(dj->fs, clust); |
} |
} |
} |
dj->index = idx; /* Lower several bits of dj->index indicates offset in dj->sect */ |
return TRUE; |
} |
/*-----------------------------------------------------------------------*/ |
/* Get file status from directory entry */ |
/*-----------------------------------------------------------------------*/ |
#if _FS_MINIMIZE <= 1 |
static |
void get_fileinfo ( /* No return code */ |
FILINFO *finfo, /* Ptr to store the file information */ |
const BYTE *dir /* Ptr to the directory entry */ |
) |
{ |
BYTE n, c, a; |
char *p; |
p = &finfo->fname[0]; |
a = _USE_NTFLAG ? dir[DIR_NTres] : 0; /* NT flag */ |
for (n = 0; n < 8; n++) { /* Convert file name (body) */ |
c = dir[n]; |
if (c == ' ') break; |
if (c == 0x05) c = 0xE5; |
if (a & 0x08 && c >= 'A' && c <= 'Z') c += 0x20; |
*p++ = c; |
} |
if (dir[8] != ' ') { /* Convert file name (extension) */ |
*p++ = '.'; |
for (n = 8; n < 11; n++) { |
c = dir[n]; |
if (c == ' ') break; |
if (a & 0x10 && c >= 'A' && c <= 'Z') c += 0x20; |
*p++ = c; |
} |
} |
*p = '\0'; |
finfo->fattrib = dir[DIR_Attr]; /* Attribute */ |
finfo->fsize = LD_DWORD(&dir[DIR_FileSize]); /* Size */ |
finfo->fdate = LD_WORD(&dir[DIR_WrtDate]); /* Date */ |
finfo->ftime = LD_WORD(&dir[DIR_WrtTime]); /* Time */ |
} |
#endif /* _FS_MINIMIZE <= 1 */ |
/*-----------------------------------------------------------------------*/ |
/* Pick a paragraph and create the name in format of directory entry */ |
/*-----------------------------------------------------------------------*/ |
static |
char make_dirfile ( /* 1: error - detected an invalid format, '\0'or'/': next character */ |
const char **path, /* Pointer to the file path pointer */ |
char *dirname /* Pointer to directory name buffer {Name(8), Ext(3), NT flag(1)} */ |
) |
{ |
BYTE n, t, c, a, b; |
memset(dirname, ' ', 8+3); /* Fill buffer with spaces */ |
a = 0; b = 0x18; /* NT flag */ |
n = 0; t = 8; |
for (;;) { |
c = *(*path)++; |
if (c == '\0' || c == '/') { /* Reached to end of str or directory separator */ |
if (n == 0) break; |
dirname[11] = _USE_NTFLAG ? (a & b) : 0; |
return c; |
} |
if (c <= ' ' || c == 0x7F) break; /* Reject invisible chars */ |
if (c == '.') { |
if (!(a & 1) && n >= 1 && n <= 8) { /* Enter extension part */ |
n = 8; t = 11; continue; |
} |
break; |
} |
if (_USE_SJIS && |
((c >= 0x81 && c <= 0x9F) || /* Accept S-JIS code */ |
(c >= 0xE0 && c <= 0xFC))) { |
if (n == 0 && c == 0xE5) /* Change heading \xE5 to \x05 */ |
c = 0x05; |
a ^= 0x01; goto md_l2; |
} |
if (c == '"') break; /* Reject " */ |
if (c <= ')') goto md_l1; /* Accept ! # $ % & ' ( ) */ |
if (c <= ',') break; /* Reject * + , */ |
if (c <= '9') goto md_l1; /* Accept - 0-9 */ |
if (c <= '?') break; /* Reject : ; < = > ? */ |
if (!(a & 1)) { /* These checks are not applied to S-JIS 2nd byte */ |
if (c == '|') break; /* Reject | */ |
if (c >= '[' && c <= ']') break;/* Reject [ \ ] */ |
if (_USE_NTFLAG && c >= 'A' && c <= 'Z') |
(t == 8) ? (b &= 0xF7) : (b &= 0xEF); |
if (c >= 'a' && c <= 'z') { /* Convert to upper case */ |
c -= 0x20; |
if (_USE_NTFLAG) (t == 8) ? (a |= 0x08) : (a |= 0x10); |
} |
} |
md_l1: |
a &= 0xFE; |
md_l2: |
if (n >= t) break; |
dirname[n++] = c; |
} |
return 1; |
} |
/*-----------------------------------------------------------------------*/ |
/* Trace a file path */ |
/*-----------------------------------------------------------------------*/ |
static |
FRESULT trace_path ( /* FR_OK(0): successful, !=0: error code */ |
DIR *dj, /* Pointer to directory object to return last directory */ |
char *fn, /* Pointer to last segment name to return {file(8),ext(3),attr(1)} */ |
const char *path, /* Full-path string to trace a file or directory */ |
BYTE **dir /* Pointer to pointer to found entry to retutn */ |
) |
{ |
DWORD clust; |
char ds; |
BYTE *dptr = NULL; |
FATFS *fs = dj->fs; |
/* Initialize directory object */ |
clust = fs->dirbase; |
if (fs->fs_type == FS_FAT32) { |
dj->clust = dj->sclust = clust; |
dj->sect = clust2sect(fs, clust); |
} else { |
dj->clust = dj->sclust = 0; |
dj->sect = clust; |
} |
dj->index = 0; |
if (*path == '\0') { /* Null path means the root directory */ |
*dir = NULL; return FR_OK; |
} |
for (;;) { |
ds = make_dirfile(&path, fn); /* Get a paragraph into fn[] */ |
if (ds == 1) return FR_INVALID_NAME; |
for (;;) { |
if (!move_window(fs, dj->sect)) return FR_RW_ERROR; |
dptr = &fs->win[(dj->index & ((SS(fs) - 1) / 32)) * 32]; /* Pointer to the directory entry */ |
if (dptr[DIR_Name] == 0) /* Has it reached to end of dir? */ |
return !ds ? FR_NO_FILE : FR_NO_PATH; |
if (dptr[DIR_Name] != 0xE5 /* Matched? */ |
&& !(dptr[DIR_Attr] & AM_VOL) |
&& !memcmp(&dptr[DIR_Name], fn, 8+3) ) break; |
if (!next_dir_entry(dj)) /* Next directory pointer */ |
return !ds ? FR_NO_FILE : FR_NO_PATH; |
} |
if (!ds) { *dir = dptr; return FR_OK; } /* Matched with end of path */ |
if (!(dptr[DIR_Attr] & AM_DIR)) return FR_NO_PATH; /* Cannot trace because it is a file */ |
clust = ((DWORD)LD_WORD(&dptr[DIR_FstClusHI]) << 16) | LD_WORD(&dptr[DIR_FstClusLO]); /* Get cluster# of the directory */ |
dj->clust = dj->sclust = clust; /* Restart scanning at the new directory */ |
dj->sect = clust2sect(fs, clust); |
dj->index = 2; |
} |
} |
/*-----------------------------------------------------------------------*/ |
/* Reserve a directory entry */ |
/*-----------------------------------------------------------------------*/ |
#if !_FS_READONLY |
static |
FRESULT reserve_direntry ( /* FR_OK: successful, FR_DENIED: no free entry, FR_RW_ERROR: a disk error occured */ |
DIR *dj, /* Target directory to create new entry */ |
BYTE **dir /* Pointer to pointer to created entry to retutn */ |
) |
{ |
DWORD clust, sector; |
BYTE c, n, *dptr; |
FATFS *fs = dj->fs; |
/* Re-initialize directory object */ |
clust = dj->sclust; |
if (clust != 0) { /* Dyanmic directory table */ |
dj->clust = clust; |
dj->sect = clust2sect(fs, clust); |
} else { /* Static directory table */ |
dj->sect = fs->dirbase; |
} |
dj->index = 0; |
do { |
if (!move_window(fs, dj->sect)) return FR_RW_ERROR; |
dptr = &fs->win[(dj->index & ((SS(dj->fs) - 1) / 32)) * 32]; /* Pointer to the directory entry */ |
c = dptr[DIR_Name]; |
if (c == 0 || c == 0xE5) { /* Found an empty entry */ |
*dir = dptr; return FR_OK; |
} |
} while (next_dir_entry(dj)); /* Next directory pointer */ |
/* Reached to end of the directory table */ |
/* Abort when it is a static table or could not stretch dynamic table */ |
if (clust == 0 || !(clust = create_chain(fs, dj->clust))) return FR_DENIED; |
if (clust == 1 || !move_window(fs, 0)) return FR_RW_ERROR; |
/* Cleanup the expanded table */ |
fs->winsect = sector = clust2sect(fs, clust); |
memset(fs->win, 0, SS(fs)); |
for (n = fs->csize; n; n--) { |
if (disk_write(fs->drive, fs->win, sector, 1) != RES_OK) |
return FR_RW_ERROR; |
sector++; |
} |
fs->winflag = 1; |
*dir = fs->win; |
return FR_OK; |
} |
#endif /* !_FS_READONLY */ |
/*-----------------------------------------------------------------------*/ |
/* Load boot record and check if it is an FAT boot record */ |
/*-----------------------------------------------------------------------*/ |
static |
BYTE check_fs ( /* 0:The FAT boot record, 1:Valid boot record but not an FAT, 2:Not a boot record or error */ |
FATFS *fs, /* File system object */ |
DWORD sect /* Sector# (lba) to check if it is an FAT boot record or not */ |
) |
{ |
if (disk_read(fs->drive, fs->win, sect, 1) != RES_OK) /* Load boot record */ |
return 2; |
if (LD_WORD(&fs->win[BS_55AA]) != 0xAA55) /* Check record signature (always placed at offset 510 even if the sector size is >512) */ |
return 2; |
if (!memcmp(&fs->win[BS_FilSysType], "FAT", 3)) /* Check FAT signature */ |
return 0; |
if (!memcmp(&fs->win[BS_FilSysType32], "FAT32", 5) && !(fs->win[BPB_ExtFlags] & 0x80)) |
return 0; |
return 1; |
} |
/*-----------------------------------------------------------------------*/ |
/* Make sure that the file system is valid */ |
/*-----------------------------------------------------------------------*/ |
static |
FRESULT auto_mount ( /* FR_OK(0): successful, !=0: any error occured */ |
const char **path, /* Pointer to pointer to the path name (drive number) */ |
FATFS **rfs, /* Pointer to pointer to the found file system object */ |
BYTE chk_wp /* !=0: Check media write protection for write access */ |
) |
{ |
BYTE drv, fmt, *tbl; |
DSTATUS stat; |
DWORD bootsect, fatsize, totalsect, maxclust; |
const char *p = *path; |
FATFS *fs; |
/* Get drive number from the path name */ |
while (*p == ' ') p++; /* Strip leading spaces */ |
drv = p[0] - '0'; /* Is there a drive number? */ |
if (drv <= 9 && p[1] == ':') |
p += 2; /* Found a drive number, get and strip it */ |
else |
drv = 0; /* No drive number is given, use drive number 0 as default */ |
if (*p == '/') p++; /* Strip heading slash */ |
*path = p; /* Return pointer to the path name */ |
/* Check if the drive number is valid or not */ |
if (drv >= _DRIVES) return FR_INVALID_DRIVE; /* Is the drive number valid? */ |
*rfs = fs = FatFs[drv]; /* Returen pointer to the corresponding file system object */ |
if (!fs) return FR_NOT_ENABLED; /* Is the file system object registered? */ |
if (fs->fs_type) { /* If the logical drive has been mounted */ |
stat = disk_status(fs->drive); |
if (!(stat & STA_NOINIT)) { /* and physical drive is kept initialized (has not been changed), */ |
#if !_FS_READONLY |
if (chk_wp && (stat & STA_PROTECT)) /* Check write protection if needed */ |
return FR_WRITE_PROTECTED; |
#endif |
return FR_OK; /* The file system object is valid */ |
} |
} |
/* The logical drive must be re-mounted. Following code attempts to mount the logical drive */ |
memset(fs, 0, sizeof(FATFS)); /* Clean-up the file system object */ |
fs->drive = LD2PD(drv); /* Bind the logical drive and a physical drive */ |
stat = disk_initialize(fs->drive); /* Initialize low level disk I/O layer */ |
if (stat & STA_NOINIT) /* Check if the drive is ready */ |
return FR_NOT_READY; |
#if S_MAX_SIZ > 512 /* Get disk sector size if needed */ |
if (disk_ioctl(drv, GET_SECTOR_SIZE, &SS(fs)) != RES_OK || SS(fs) > S_MAX_SIZ) |
return FR_NO_FILESYSTEM; |
#endif |
#if !_FS_READONLY |
if (chk_wp && (stat & STA_PROTECT)) /* Check write protection if needed */ |
return FR_WRITE_PROTECTED; |
#endif |
/* Search FAT partition on the drive */ |
fmt = check_fs(fs, bootsect = 0); /* Check sector 0 as an SFD format */ |
if (fmt == 1) { /* Not an FAT boot record, it may be patitioned */ |
/* Check a partition listed in top of the partition table */ |
tbl = &fs->win[MBR_Table + LD2PT(drv) * 16]; /* Partition table */ |
if (tbl[4]) { /* Is the partition existing? */ |
bootsect = LD_DWORD(&tbl[8]); /* Partition offset in LBA */ |
fmt = check_fs(fs, bootsect); /* Check the partition */ |
} |
} |
if (fmt || LD_WORD(&fs->win[BPB_BytsPerSec]) != SS(fs)) /* No valid FAT patition is found */ |
return FR_NO_FILESYSTEM; |
/* Initialize the file system object */ |
fatsize = LD_WORD(&fs->win[BPB_FATSz16]); /* Number of sectors per FAT */ |
if (!fatsize) fatsize = LD_DWORD(&fs->win[BPB_FATSz32]); |
fs->sects_fat = fatsize; |
fs->n_fats = fs->win[BPB_NumFATs]; /* Number of FAT copies */ |
fatsize *= fs->n_fats; /* (Number of sectors in FAT area) */ |
fs->fatbase = bootsect + LD_WORD(&fs->win[BPB_RsvdSecCnt]); /* FAT start sector (lba) */ |
fs->csize = fs->win[BPB_SecPerClus]; /* Number of sectors per cluster */ |
fs->n_rootdir = LD_WORD(&fs->win[BPB_RootEntCnt]); /* Nmuber of root directory entries */ |
totalsect = LD_WORD(&fs->win[BPB_TotSec16]); /* Number of sectors on the file system */ |
if (!totalsect) totalsect = LD_DWORD(&fs->win[BPB_TotSec32]); |
fs->max_clust = maxclust = (totalsect /* max_clust = Last cluster# + 1 */ |
- LD_WORD(&fs->win[BPB_RsvdSecCnt]) - fatsize - fs->n_rootdir / (SS(fs)/32) |
) / fs->csize + 2; |
fmt = FS_FAT12; /* Determine the FAT sub type */ |
if (maxclust >= 0xFF7) fmt = FS_FAT16; |
if (maxclust >= 0xFFF7) fmt = FS_FAT32; |
if (fmt == FS_FAT32) |
fs->dirbase = LD_DWORD(&fs->win[BPB_RootClus]); /* Root directory start cluster */ |
else |
fs->dirbase = fs->fatbase + fatsize; /* Root directory start sector (lba) */ |
fs->database = fs->fatbase + fatsize + fs->n_rootdir / (SS(fs)/32); /* Data start sector (lba) */ |
#if !_FS_READONLY |
/* Initialize allocation information */ |
fs->free_clust = 0xFFFFFFFF; |
#if _USE_FSINFO |
/* Get fsinfo if needed */ |
if (fmt == FS_FAT32) { |
fs->fsi_sector = bootsect + LD_WORD(&fs->win[BPB_FSInfo]); |
if (disk_read(fs->drive, fs->win, fs->fsi_sector, 1) == RES_OK && |
LD_WORD(&fs->win[BS_55AA]) == 0xAA55 && |
LD_DWORD(&fs->win[FSI_LeadSig]) == 0x41615252 && |
LD_DWORD(&fs->win[FSI_StrucSig]) == 0x61417272) { |
fs->last_clust = LD_DWORD(&fs->win[FSI_Nxt_Free]); |
fs->free_clust = LD_DWORD(&fs->win[FSI_Free_Count]); |
} |
} |
#endif |
#endif |
fs->fs_type = fmt; /* FAT syb-type */ |
fs->id = ++fsid; /* File system mount ID */ |
return FR_OK; |
} |
/*-----------------------------------------------------------------------*/ |
/* Check if the file/dir object is valid or not */ |
/*-----------------------------------------------------------------------*/ |
static |
FRESULT validate ( /* FR_OK(0): The object is valid, !=0: Invalid */ |
const FATFS *fs, /* Pointer to the file system object */ |
WORD id /* Member id of the target object to be checked */ |
) |
{ |
if (!fs || !fs->fs_type || fs->id != id) |
return FR_INVALID_OBJECT; |
if (disk_status(fs->drive) & STA_NOINIT) |
return FR_NOT_READY; |
return FR_OK; |
} |
/*-------------------------------------------------------------------------- |
Public Functions |
--------------------------------------------------------------------------*/ |
/*-----------------------------------------------------------------------*/ |
/* Mount/Unmount a Locical Drive */ |
/*-----------------------------------------------------------------------*/ |
FRESULT f_mount ( |
BYTE drv, /* Logical drive number to be mounted/unmounted */ |
FATFS *fs /* Pointer to new file system object (NULL for unmount)*/ |
) |
{ |
if (drv >= _DRIVES) return FR_INVALID_DRIVE; |
if (FatFs[drv]) FatFs[drv]->fs_type = 0; /* Clear old object */ |
FatFs[drv] = fs; /* Register and clear new object */ |
if (fs) fs->fs_type = 0; |
return FR_OK; |
} |
/*-----------------------------------------------------------------------*/ |
/* Open or Create a File */ |
/*-----------------------------------------------------------------------*/ |
FRESULT f_open ( |
FIL *fp, /* Pointer to the blank file object */ |
const char *path, /* Pointer to the file name */ |
BYTE mode /* Access mode and file open mode flags */ |
) |
{ |
FRESULT res; |
DIR dj; |
BYTE *dir; |
char fn[8+3+1]; |
fp->fs = NULL; /* Clear file object */ |
#if !_FS_READONLY |
mode &= (FA_READ|FA_WRITE|FA_CREATE_ALWAYS|FA_OPEN_ALWAYS|FA_CREATE_NEW); |
res = auto_mount(&path, &dj.fs, (BYTE)(mode & (FA_WRITE|FA_CREATE_ALWAYS|FA_OPEN_ALWAYS|FA_CREATE_NEW))); |
#else |
mode &= FA_READ; |
res = auto_mount(&path, &dj.fs, 0); |
#endif |
if (res != FR_OK) return res; |
res = trace_path(&dj, fn, path, &dir); /* Trace the file path */ |
#if !_FS_READONLY |
/* Create or Open a file */ |
if (mode & (FA_CREATE_ALWAYS|FA_OPEN_ALWAYS|FA_CREATE_NEW)) { |
DWORD ps, rs; |
if (res != FR_OK) { /* No file, create new */ |
if (res != FR_NO_FILE) return res; |
res = reserve_direntry(&dj, &dir); |
if (res != FR_OK) return res; |
memset(dir, 0, 32); /* Initialize the new entry with open name */ |
memcpy(&dir[DIR_Name], fn, 8+3); |
dir[DIR_NTres] = fn[11]; |
mode |= FA_CREATE_ALWAYS; |
} |
else { /* Any object is already existing */ |
if (mode & FA_CREATE_NEW) /* Cannot create new */ |
return FR_EXIST; |
if (!dir || (dir[DIR_Attr] & (AM_RDO|AM_DIR))) /* Cannot overwrite it (R/O or DIR) */ |
return FR_DENIED; |
if (mode & FA_CREATE_ALWAYS) { /* Resize it to zero if needed */ |
rs = ((DWORD)LD_WORD(&dir[DIR_FstClusHI]) << 16) | LD_WORD(&dir[DIR_FstClusLO]); /* Get start cluster */ |
ST_WORD(&dir[DIR_FstClusHI], 0); /* cluster = 0 */ |
ST_WORD(&dir[DIR_FstClusLO], 0); |
ST_DWORD(&dir[DIR_FileSize], 0); /* size = 0 */ |
dj.fs->winflag = 1; |
ps = dj.fs->winsect; /* Remove the cluster chain */ |
if (!remove_chain(dj.fs, rs) || !move_window(dj.fs, ps)) |
return FR_RW_ERROR; |
dj.fs->last_clust = rs - 1; /* Reuse the cluster hole */ |
} |
} |
if (mode & FA_CREATE_ALWAYS) { |
dir[DIR_Attr] = 0; /* Reset attribute */ |
ps = get_fattime(); |
ST_DWORD(&dir[DIR_CrtTime], ps); /* Created time */ |
dj.fs->winflag = 1; |
mode |= FA__WRITTEN; /* Set file changed flag */ |
} |
} |
/* Open an existing file */ |
else { |
#endif /* !_FS_READONLY */ |
if (res != FR_OK) return res; /* Trace failed */ |
if (!dir || (dir[DIR_Attr] & AM_DIR)) /* It is a directory */ |
return FR_NO_FILE; |
#if !_FS_READONLY |
if ((mode & FA_WRITE) && (dir[DIR_Attr] & AM_RDO)) /* R/O violation */ |
return FR_DENIED; |
} |
fp->dir_sect = dj.fs->winsect; /* Pointer to the directory entry */ |
fp->dir_ptr = dir; |
#endif |
fp->flag = mode; /* File access mode */ |
fp->org_clust = /* File start cluster */ |
((DWORD)LD_WORD(&dir[DIR_FstClusHI]) << 16) | LD_WORD(&dir[DIR_FstClusLO]); |
fp->fsize = LD_DWORD(&dir[DIR_FileSize]); /* File size */ |
fp->fptr = 0; fp->csect = 255; /* File pointer */ |
fp->curr_sect = 0; |
fp->fs = dj.fs; fp->id = dj.fs->id; /* Owner file system object of the file */ |
return FR_OK; |
} |
/*-----------------------------------------------------------------------*/ |
/* Read File */ |
/*-----------------------------------------------------------------------*/ |
FRESULT f_read ( |
FIL *fp, /* Pointer to the file object */ |
void *buff, /* Pointer to data buffer */ |
UINT btr, /* Number of bytes to read */ |
UINT *br /* Pointer to number of bytes read */ |
) |
{ |
FRESULT res; |
DWORD clust, sect, remain; |
UINT rcnt, cc; |
BYTE *rbuff = buff; |
*br = 0; |
res = validate(fp->fs, fp->id); /* Check validity of the object */ |
if (res != FR_OK) return res; |
if (fp->flag & FA__ERROR) return FR_RW_ERROR; /* Check error flag */ |
if (!(fp->flag & FA_READ)) return FR_DENIED; /* Check access mode */ |
remain = fp->fsize - fp->fptr; |
if (btr > remain) btr = (UINT)remain; /* Truncate btr by remaining bytes */ |
for ( ; btr; /* Repeat until all data transferred */ |
rbuff += rcnt, fp->fptr += rcnt, *br += rcnt, btr -= rcnt) { |
if ((fp->fptr % SS(fp->fs)) == 0) { /* On the sector boundary? */ |
if (fp->csect >= fp->fs->csize) { /* On the cluster boundary? */ |
clust = (fp->fptr == 0) ? /* On the top of the file? */ |
fp->org_clust : get_cluster(fp->fs, fp->curr_clust); |
if (clust < 2 || clust >= fp->fs->max_clust) goto fr_error; |
fp->curr_clust = clust; /* Update current cluster */ |
fp->csect = 0; /* Reset sector address in the cluster */ |
} |
sect = clust2sect(fp->fs, fp->curr_clust) + fp->csect; /* Get current sector */ |
cc = btr / SS(fp->fs); /* When remaining bytes >= sector size, */ |
if (cc) { /* Read maximum contiguous sectors directly */ |
if (fp->csect + cc > fp->fs->csize) /* Clip at cluster boundary */ |
cc = fp->fs->csize - fp->csect; |
if (disk_read(fp->fs->drive, rbuff, sect, (BYTE)cc) != RES_OK) |
goto fr_error; |
fp->csect += (BYTE)cc; /* Next sector address in the cluster */ |
rcnt = SS(fp->fs) * cc; /* Number of bytes transferred */ |
continue; |
} |
if (sect != fp->curr_sect) { /* Is window offset changed? */ |
#if !_FS_READONLY |
if (fp->flag & FA__DIRTY) { /* Write back file I/O buffer if needed */ |
if (disk_write(fp->fs->drive, fp->buffer, fp->curr_sect, 1) != RES_OK) |
goto fr_error; |
fp->flag &= (BYTE)~FA__DIRTY; |
} |
#endif |
if (disk_read(fp->fs->drive, fp->buffer, sect, 1) != RES_OK) /* Fill file I/O buffer with file data */ |
goto fr_error; |
fp->curr_sect = sect; |
} |
fp->csect++; /* Next sector address in the cluster */ |
} |
rcnt = SS(fp->fs) - (fp->fptr % SS(fp->fs)); /* Get partial sector from file I/O buffer */ |
if (rcnt > btr) rcnt = btr; |
memcpy(rbuff, &fp->buffer[fp->fptr % SS(fp->fs)], rcnt); |
} |
return FR_OK; |
fr_error: /* Abort this file due to an unrecoverable error */ |
fp->flag |= FA__ERROR; |
return FR_RW_ERROR; |
} |
#if !_FS_READONLY |
/*-----------------------------------------------------------------------*/ |
/* Write File */ |
/*-----------------------------------------------------------------------*/ |
FRESULT f_write ( |
FIL *fp, /* Pointer to the file object */ |
const void *buff, /* Pointer to the data to be written */ |
UINT btw, /* Number of bytes to write */ |
UINT *bw /* Pointer to number of bytes written */ |
) |
{ |
FRESULT res; |
DWORD clust, sect; |
UINT wcnt, cc; |
const BYTE *wbuff = buff; |
*bw = 0; |
res = validate(fp->fs, fp->id); /* Check validity of the object */ |
if (res != FR_OK) return res; |
if (fp->flag & FA__ERROR) return FR_RW_ERROR; /* Check error flag */ |
if (!(fp->flag & FA_WRITE)) return FR_DENIED; /* Check access mode */ |
if (fp->fsize + btw < fp->fsize) return FR_OK; /* File size cannot reach 4GB */ |
for ( ; btw; /* Repeat until all data transferred */ |
wbuff += wcnt, fp->fptr += wcnt, *bw += wcnt, btw -= wcnt) { |
if ((fp->fptr % SS(fp->fs)) == 0) { /* On the sector boundary? */ |
if (fp->csect >= fp->fs->csize) { /* On the cluster boundary? */ |
if (fp->fptr == 0) { /* On the top of the file? */ |
clust = fp->org_clust; /* Follow from the origin */ |
if (clust == 0) /* When there is no cluster chain, */ |
fp->org_clust = clust = create_chain(fp->fs, 0); /* Create a new cluster chain */ |
} else { /* Middle or end of the file */ |
clust = create_chain(fp->fs, fp->curr_clust); /* Trace or streach cluster chain */ |
} |
if (clust == 0) break; /* Could not allocate a new cluster (disk full) */ |
if (clust == 1 || clust >= fp->fs->max_clust) goto fw_error; |
fp->curr_clust = clust; /* Update current cluster */ |
fp->csect = 0; /* Reset sector address in the cluster */ |
} |
sect = clust2sect(fp->fs, fp->curr_clust) + fp->csect; /* Get current sector */ |
cc = btw / SS(fp->fs); /* When remaining bytes >= sector size, */ |
if (cc) { /* Write maximum contiguous sectors directly */ |
if (fp->csect + cc > fp->fs->csize) /* Clip at cluster boundary */ |
cc = fp->fs->csize - fp->csect; |
if (disk_write(fp->fs->drive, wbuff, sect, (BYTE)cc) != RES_OK) |
goto fw_error; |
fp->csect += (BYTE)cc; /* Next sector address in the cluster */ |
wcnt = SS(fp->fs) * cc; /* Number of bytes transferred */ |
continue; |
} |
if (sect != fp->curr_sect) { /* Is window offset changed? */ |
if (fp->flag & FA__DIRTY) { /* Write back file I/O buffer if needed */ |
if (disk_write(fp->fs->drive, fp->buffer, fp->curr_sect, 1) != RES_OK) |
goto fw_error; |
fp->flag &= (BYTE)~FA__DIRTY; |
} |
if (fp->fptr < fp->fsize && /* Fill file I/O buffer with file data */ |
disk_read(fp->fs->drive, fp->buffer, sect, 1) != RES_OK) |
goto fw_error; |
fp->curr_sect = sect; |
} |
fp->csect++; /* Next sector address in the cluster */ |
} |
wcnt = SS(fp->fs) - (fp->fptr % SS(fp->fs)); /* Put partial sector into file I/O buffer */ |
if (wcnt > btw) wcnt = btw; |
memcpy(&fp->buffer[fp->fptr % SS(fp->fs)], wbuff, wcnt); |
fp->flag |= FA__DIRTY; |
} |
if (fp->fptr > fp->fsize) fp->fsize = fp->fptr; /* Update file size if needed */ |
fp->flag |= FA__WRITTEN; /* Set file changed flag */ |
return FR_OK; |
fw_error: /* Abort this file due to an unrecoverable error */ |
fp->flag |= FA__ERROR; |
return FR_RW_ERROR; |
} |
/*-----------------------------------------------------------------------*/ |
/* Synchronize the file object */ |
/*-----------------------------------------------------------------------*/ |
FRESULT f_sync ( |
FIL *fp /* Pointer to the file object */ |
) |
{ |
FRESULT res; |
DWORD tim; |
BYTE *dir; |
res = validate(fp->fs, fp->id); /* Check validity of the object */ |
if (res == FR_OK) { |
if (fp->flag & FA__WRITTEN) { /* Has the file been written? */ |
/* Write back data buffer if needed */ |
if (fp->flag & FA__DIRTY) { |
if (disk_write(fp->fs->drive, fp->buffer, fp->curr_sect, 1) != RES_OK) |
return FR_RW_ERROR; |
fp->flag &= (BYTE)~FA__DIRTY; |
} |
/* Update the directory entry */ |
if (!move_window(fp->fs, fp->dir_sect)) |
return FR_RW_ERROR; |
dir = fp->dir_ptr; |
dir[DIR_Attr] |= AM_ARC; /* Set archive bit */ |
ST_DWORD(&dir[DIR_FileSize], fp->fsize); /* Update file size */ |
ST_WORD(&dir[DIR_FstClusLO], fp->org_clust); /* Update start cluster */ |
ST_WORD(&dir[DIR_FstClusHI], fp->org_clust >> 16); |
tim = get_fattime(); /* Updated time */ |
ST_DWORD(&dir[DIR_WrtTime], tim); |
fp->flag &= (BYTE)~FA__WRITTEN; |
res = sync(fp->fs); |
} |
} |
return res; |
} |
#endif /* !_FS_READONLY */ |
/*-----------------------------------------------------------------------*/ |
/* Close File */ |
/*-----------------------------------------------------------------------*/ |
FRESULT f_close ( |
FIL *fp /* Pointer to the file object to be closed */ |
) |
{ |
FRESULT res; |
#if !_FS_READONLY |
res = f_sync(fp); |
#else |
res = validate(fp->fs, fp->id); |
#endif |
if (res == FR_OK) fp->fs = NULL; |
return res; |
} |
#if _FS_MINIMIZE <= 2 |
/*-----------------------------------------------------------------------*/ |
/* Seek File R/W Pointer */ |
/*-----------------------------------------------------------------------*/ |
FRESULT f_lseek ( |
FIL *fp, /* Pointer to the file object */ |
DWORD ofs /* File pointer from top of file */ |
) |
{ |
FRESULT res; |
DWORD clust, csize, nsect, ifptr; |
res = validate(fp->fs, fp->id); /* Check validity of the object */ |
if (res != FR_OK) return res; |
if (fp->flag & FA__ERROR) return FR_RW_ERROR; |
if (ofs > fp->fsize /* In read-only mode, clip offset with the file size */ |
#if !_FS_READONLY |
&& !(fp->flag & FA_WRITE) |
#endif |
) ofs = fp->fsize; |
ifptr = fp->fptr; |
fp->fptr = 0; fp->csect = 255; |
nsect = 0; |
if (ofs > 0) { |
csize = (DWORD)fp->fs->csize * SS(fp->fs); /* Cluster size (byte) */ |
if (ifptr > 0 && |
(ofs - 1) / csize >= (ifptr - 1) / csize) {/* When seek to same or following cluster, */ |
fp->fptr = (ifptr - 1) & ~(csize - 1); /* start from the current cluster */ |
ofs -= fp->fptr; |
clust = fp->curr_clust; |
} else { /* When seek to back cluster, */ |
clust = fp->org_clust; /* start from the first cluster */ |
#if !_FS_READONLY |
if (clust == 0) { /* If no cluster chain, create a new chain */ |
clust = create_chain(fp->fs, 0); |
if (clust == 1) goto fk_error; |
fp->org_clust = clust; |
} |
#endif |
fp->curr_clust = clust; |
} |
if (clust != 0) { |
while (ofs > csize) { /* Cluster following loop */ |
#if !_FS_READONLY |
if (fp->flag & FA_WRITE) { /* Check if in write mode or not */ |
clust = create_chain(fp->fs, clust); /* Force streached if in write mode */ |
if (clust == 0) { /* When disk gets full, clip file size */ |
ofs = csize; break; |
} |
} else |
#endif |
clust = get_cluster(fp->fs, clust); /* Follow cluster chain if not in write mode */ |
if (clust < 2 || clust >= fp->fs->max_clust) goto fk_error; |
fp->curr_clust = clust; |
fp->fptr += csize; |
ofs -= csize; |
} |
fp->fptr += ofs; |
fp->csect = (BYTE)(ofs / SS(fp->fs)); /* Sector offset in the cluster */ |
if (ofs & (SS(fp->fs) - 1)) { |
nsect = clust2sect(fp->fs, clust) + fp->csect; /* Current sector */ |
fp->csect++; |
} |
} |
} |
if (nsect && nsect != fp->curr_sect) { |
#if !_FS_READONLY |
if (fp->flag & FA__DIRTY) { /* Write-back dirty buffer if needed */ |
if (disk_write(fp->fs->drive, fp->buffer, fp->curr_sect, 1) != RES_OK) |
goto fk_error; |
fp->flag &= (BYTE)~FA__DIRTY; |
} |
#endif |
if (disk_read(fp->fs->drive, fp->buffer, nsect, 1) != RES_OK) |
goto fk_error; |
fp->curr_sect = nsect; |
} |
#if !_FS_READONLY |
if (fp->fptr > fp->fsize) { /* Set changed flag if the file was extended */ |
fp->fsize = fp->fptr; |
fp->flag |= FA__WRITTEN; |
} |
#endif |
return FR_OK; |
fk_error: /* Abort this file due to an unrecoverable error */ |
fp->flag |= FA__ERROR; |
return FR_RW_ERROR; |
} |
#if _FS_MINIMIZE <= 1 |
/*-----------------------------------------------------------------------*/ |
/* Create a directroy object */ |
/*-----------------------------------------------------------------------*/ |
FRESULT f_opendir ( |
DIR *dj, /* Pointer to directory object to create */ |
const char *path /* Pointer to the directory path */ |
) |
{ |
FRESULT res; |
BYTE *dir; |
char fn[8+3+1]; |
res = auto_mount(&path, &dj->fs, 0); |
if (res == FR_OK) { |
res = trace_path(dj, fn, path, &dir); /* Trace the directory path */ |
if (res == FR_OK) { /* Trace completed */ |
if (dir) { /* It is not the root dir */ |
if (dir[DIR_Attr] & AM_DIR) { /* The entry is a directory */ |
dj->clust = ((DWORD)LD_WORD(&dir[DIR_FstClusHI]) << 16) | LD_WORD(&dir[DIR_FstClusLO]); |
dj->sect = clust2sect(dj->fs, dj->clust); |
dj->index = 2; |
} else { /* The entry is not a directory */ |
res = FR_NO_FILE; |
} |
} |
dj->id = dj->fs->id; |
} |
} |
return res; |
} |
/*-----------------------------------------------------------------------*/ |
/* Read Directory Entry in Sequense */ |
/*-----------------------------------------------------------------------*/ |
FRESULT f_readdir ( |
DIR *dj, /* Pointer to the directory object */ |
FILINFO *finfo /* Pointer to file information to return */ |
) |
{ |
BYTE *dir, c, res; |
res = validate(dj->fs, dj->id); /* Check validity of the object */ |
if (res != FR_OK) return res; |
finfo->fname[0] = 0; |
while (dj->sect) { |
if (!move_window(dj->fs, dj->sect)) |
return FR_RW_ERROR; |
dir = &dj->fs->win[(dj->index & ((SS(dj->fs) - 1) >> 5)) * 32]; /* pointer to the directory entry */ |
c = dir[DIR_Name]; |
if (c == 0) break; /* Has it reached to end of dir? */ |
if (c != 0xE5 && !(dir[DIR_Attr] & AM_VOL)) /* Is it a valid entry? */ |
get_fileinfo(finfo, dir); |
if (!next_dir_entry(dj)) dj->sect = 0; /* Next entry */ |
if (finfo->fname[0]) break; /* Found valid entry */ |
} |
return FR_OK; |
} |
#if _FS_MINIMIZE == 0 |
/*-----------------------------------------------------------------------*/ |
/* Get File Status */ |
/*-----------------------------------------------------------------------*/ |
FRESULT f_stat ( |
const char *path, /* Pointer to the file path */ |
FILINFO *finfo /* Pointer to file information to return */ |
) |
{ |
FRESULT res; |
DIR dj; |
BYTE *dir; |
char fn[8+3+1]; |
res = auto_mount(&path, &dj.fs, 0); |
if (res == FR_OK) { |
res = trace_path(&dj, fn, path, &dir); /* Trace the file path */ |
if (res == FR_OK) { /* Trace completed */ |
if (dir) /* Found an object */ |
get_fileinfo(finfo, dir); |
else /* It is root dir */ |
res = FR_INVALID_NAME; |
} |
} |
return res; |
} |
#if !_FS_READONLY |
/*-----------------------------------------------------------------------*/ |
/* Truncate File */ |
/*-----------------------------------------------------------------------*/ |
FRESULT f_truncate ( |
FIL *fp /* Pointer to the file object */ |
) |
{ |
FRESULT res; |
DWORD ncl; |
res = validate(fp->fs, fp->id); /* Check validity of the object */ |
if (res != FR_OK) return res; |
if (fp->flag & FA__ERROR) return FR_RW_ERROR; /* Check error flag */ |
if (!(fp->flag & FA_WRITE)) return FR_DENIED; /* Check access mode */ |
if (fp->fsize > fp->fptr) { |
fp->fsize = fp->fptr; /* Set file size to current R/W point */ |
fp->flag |= FA__WRITTEN; |
if (fp->fptr == 0) { /* When set file size to zero, remove entire cluster chain */ |
if (!remove_chain(fp->fs, fp->org_clust)) goto ft_error; |
fp->org_clust = 0; |
} else { /* When truncate a part of the file, remove remaining clusters */ |
ncl = get_cluster(fp->fs, fp->curr_clust); |
if (ncl < 2) goto ft_error; |
if (ncl < fp->fs->max_clust) { |
if (!put_cluster(fp->fs, fp->curr_clust, 0x0FFFFFFF)) goto ft_error; |
if (!remove_chain(fp->fs, ncl)) goto ft_error; |
} |
} |
} |
return FR_OK; |
ft_error: /* Abort this file due to an unrecoverable error */ |
fp->flag |= FA__ERROR; |
return FR_RW_ERROR; |
} |
/*-----------------------------------------------------------------------*/ |
/* Get Number of Free Clusters */ |
/*-----------------------------------------------------------------------*/ |
FRESULT f_getfree ( |
const char *drv, /* Pointer to the logical drive number (root dir) */ |
DWORD *nclust, /* Pointer to the variable to return number of free clusters */ |
FATFS **fatfs /* Pointer to pointer to corresponding file system object to return */ |
) |
{ |
FRESULT res; |
DWORD n, clust, sect; |
BYTE fat, f, *p; |
/* Get drive number */ |
res = auto_mount(&drv, fatfs, 0); |
if (res != FR_OK) return res; |
/* If number of free cluster is valid, return it without cluster scan. */ |
if ((*fatfs)->free_clust <= (*fatfs)->max_clust - 2) { |
*nclust = (*fatfs)->free_clust; |
return FR_OK; |
} |
/* Get number of free clusters */ |
fat = (*fatfs)->fs_type; |
n = 0; |
if (fat == FS_FAT12) { |
clust = 2; |
do { |
if ((WORD)get_cluster(*fatfs, clust) == 0) n++; |
} while (++clust < (*fatfs)->max_clust); |
} else { |
clust = (*fatfs)->max_clust; |
sect = (*fatfs)->fatbase; |
f = 0; p = 0; |
do { |
if (!f) { |
if (!move_window(*fatfs, sect++)) return FR_RW_ERROR; |
p = (*fatfs)->win; |
} |
if (fat == FS_FAT16) { |
if (LD_WORD(p) == 0) n++; |
p += 2; f += 1; |
} else { |
if (LD_DWORD(p) == 0) n++; |
p += 4; f += 2; |
} |
} while (--clust); |
} |
(*fatfs)->free_clust = n; |
#if _USE_FSINFO |
if (fat == FS_FAT32) (*fatfs)->fsi_flag = 1; |
#endif |
*nclust = n; |
return FR_OK; |
} |
/*-----------------------------------------------------------------------*/ |
/* Delete a File or Directory */ |
/*-----------------------------------------------------------------------*/ |
FRESULT f_unlink ( |
const char *path /* Pointer to the file or directory path */ |
) |
{ |
FRESULT res; |
DIR dj; |
BYTE *dir, *sdir; |
DWORD dclust, dsect; |
char fn[8+3+1]; |
res = auto_mount(&path, &dj.fs, 1); |
if (res != FR_OK) return res; |
res = trace_path(&dj, fn, path, &dir); /* Trace the file path */ |
if (res != FR_OK) return res; /* Trace failed */ |
if (!dir) return FR_INVALID_NAME; /* It is the root directory */ |
if (dir[DIR_Attr] & AM_RDO) return FR_DENIED; /* It is a R/O object */ |
dsect = dj.fs->winsect; |
dclust = ((DWORD)LD_WORD(&dir[DIR_FstClusHI]) << 16) | LD_WORD(&dir[DIR_FstClusLO]); |
if (dir[DIR_Attr] & AM_DIR) { /* It is a sub-directory */ |
dj.clust = dclust; /* Check if the sub-dir is empty or not */ |
dj.sect = clust2sect(dj.fs, dclust); |
dj.index = 2; |
do { |
if (!move_window(dj.fs, dj.sect)) return FR_RW_ERROR; |
sdir = &dj.fs->win[(dj.index & ((SS(dj.fs) - 1) >> 5)) * 32]; |
if (sdir[DIR_Name] == 0) break; |
if (sdir[DIR_Name] != 0xE5 && !(sdir[DIR_Attr] & AM_VOL)) |
return FR_DENIED; /* The directory is not empty */ |
} while (next_dir_entry(&dj)); |
} |
if (!move_window(dj.fs, dsect)) return FR_RW_ERROR; /* Mark the directory entry 'deleted' */ |
dir[DIR_Name] = 0xE5; |
dj.fs->winflag = 1; |
if (!remove_chain(dj.fs, dclust)) return FR_RW_ERROR; /* Remove the cluster chain */ |
return sync(dj.fs); |
} |
/*-----------------------------------------------------------------------*/ |
/* Create a Directory */ |
/*-----------------------------------------------------------------------*/ |
FRESULT f_mkdir ( |
const char *path /* Pointer to the directory path */ |
) |
{ |
FRESULT res; |
DIR dj; |
BYTE *dir, *fw, n; |
char fn[8+3+1]; |
DWORD sect, dsect, dclust, pclust, tim; |
res = auto_mount(&path, &dj.fs, 1); |
if (res != FR_OK) return res; |
res = trace_path(&dj, fn, path, &dir); /* Trace the file path */ |
if (res == FR_OK) return FR_EXIST; /* Any file or directory is already existing */ |
if (res != FR_NO_FILE) return res; |
res = reserve_direntry(&dj, &dir); /* Reserve a directory entry */ |
if (res != FR_OK) return res; |
sect = dj.fs->winsect; |
dclust = create_chain(dj.fs, 0); /* Allocate a cluster for new directory table */ |
if (dclust == 1) return FR_RW_ERROR; |
dsect = clust2sect(dj.fs, dclust); |
if (!dsect) return FR_DENIED; |
if (!move_window(dj.fs, dsect)) return FR_RW_ERROR; |
fw = dj.fs->win; |
memset(fw, 0, SS(dj.fs)); /* Clear the new directory table */ |
for (n = 1; n < dj.fs->csize; n++) { |
if (disk_write(dj.fs->drive, fw, ++dsect, 1) != RES_OK) |
return FR_RW_ERROR; |
} |
memset(&fw[DIR_Name], ' ', 8+3); /* Create "." entry */ |
fw[DIR_Name] = '.'; |
fw[DIR_Attr] = AM_DIR; |
tim = get_fattime(); |
ST_DWORD(&fw[DIR_WrtTime], tim); |
memcpy(&fw[32], &fw[0], 32); fw[33] = '.'; /* Create ".." entry */ |
ST_WORD(&fw[ DIR_FstClusLO], dclust); |
ST_WORD(&fw[ DIR_FstClusHI], dclust >> 16); |
pclust = dj.sclust; |
if (dj.fs->fs_type == FS_FAT32 && pclust == dj.fs->dirbase) pclust = 0; |
ST_WORD(&fw[32+DIR_FstClusLO], pclust); |
ST_WORD(&fw[32+DIR_FstClusHI], pclust >> 16); |
dj.fs->winflag = 1; |
if (!move_window(dj.fs, sect)) return FR_RW_ERROR; |
memset(&dir[0], 0, 32); /* Initialize the new entry */ |
memcpy(&dir[DIR_Name], fn, 8+3); /* Name */ |
dir[DIR_NTres] = fn[11]; |
dir[DIR_Attr] = AM_DIR; /* Attribute */ |
ST_DWORD(&dir[DIR_WrtTime], tim); /* Crated time */ |
ST_WORD(&dir[DIR_FstClusLO], dclust); /* Table start cluster */ |
ST_WORD(&dir[DIR_FstClusHI], dclust >> 16); |
return sync(dj.fs); |
} |
/*-----------------------------------------------------------------------*/ |
/* Change File Attribute */ |
/*-----------------------------------------------------------------------*/ |
FRESULT f_chmod ( |
const char *path, /* Pointer to the file path */ |
BYTE value, /* Attribute bits */ |
BYTE mask /* Attribute mask to change */ |
) |
{ |
FRESULT res; |
DIR dj; |
BYTE *dir; |
char fn[8+3+1]; |
res = auto_mount(&path, &dj.fs, 1); |
if (res == FR_OK) { |
res = trace_path(&dj, fn, path, &dir); /* Trace the file path */ |
if (res == FR_OK) { /* Trace completed */ |
if (!dir) { |
res = FR_INVALID_NAME; /* Root directory */ |
} else { |
mask &= AM_RDO|AM_HID|AM_SYS|AM_ARC; /* Valid attribute mask */ |
dir[DIR_Attr] = (value & mask) | (dir[DIR_Attr] & (BYTE)~mask); /* Apply attribute change */ |
res = sync(dj.fs); |
} |
} |
} |
return res; |
} |
/*-----------------------------------------------------------------------*/ |
/* Change Timestamp */ |
/*-----------------------------------------------------------------------*/ |
FRESULT f_utime ( |
const char *path, /* Pointer to the file/directory name */ |
const FILINFO *finfo /* Pointer to the timestamp to be set */ |
) |
{ |
FRESULT res; |
DIR dj; |
BYTE *dir; |
char fn[8+3+1]; |
res = auto_mount(&path, &dj.fs, 1); |
if (res == FR_OK) { |
res = trace_path(&dj, fn, path, &dir); /* Trace the file path */ |
if (res == FR_OK) { /* Trace completed */ |
if (!dir) { |
res = FR_INVALID_NAME; /* Root directory */ |
} else { |
ST_WORD(&dir[DIR_WrtTime], finfo->ftime); |
ST_WORD(&dir[DIR_WrtDate], finfo->fdate); |
res = sync(dj.fs); |
} |
} |
} |
return res; |
} |
/*-----------------------------------------------------------------------*/ |
/* Rename File/Directory */ |
/*-----------------------------------------------------------------------*/ |
FRESULT f_rename ( |
const char *path_old, /* Pointer to the old name */ |
const char *path_new /* Pointer to the new name */ |
) |
{ |
FRESULT res; |
DIR dj; |
DWORD sect_old; |
BYTE *dir_old, *dir_new, direntry[32-11]; |
char fn[8+3+1]; |
res = auto_mount(&path_old, &dj.fs, 1); |
if (res != FR_OK) return res; |
res = trace_path(&dj, fn, path_old, &dir_old); /* Check old object */ |
if (res != FR_OK) return res; /* The old object is not found */ |
if (!dir_old) return FR_NO_FILE; |
sect_old = dj.fs->winsect; /* Save the object information */ |
memcpy(direntry, &dir_old[DIR_Attr], 32-11); |
res = trace_path(&dj, fn, path_new, &dir_new); /* Check new object */ |
if (res == FR_OK) return FR_EXIST; /* The new object name is already existing */ |
if (res != FR_NO_FILE) return res; /* Is there no old name? */ |
res = reserve_direntry(&dj, &dir_new); /* Reserve a directory entry */ |
if (res != FR_OK) return res; |
memcpy(&dir_new[DIR_Attr], direntry, 32-11); /* Create new entry */ |
memcpy(&dir_new[DIR_Name], fn, 8+3); |
dir_new[DIR_NTres] = fn[11]; |
dj.fs->winflag = 1; |
if (!move_window(dj.fs, sect_old)) return FR_RW_ERROR; /* Delete old entry */ |
dir_old[DIR_Name] = 0xE5; |
return sync(dj.fs); |
} |
#endif /* !_FS_READONLY */ |
#endif /* _FS_MINIMIZE == 0 */ |
#endif /* _FS_MINIMIZE <= 1 */ |
#endif /* _FS_MINIMIZE <= 2 */ |
#if _USE_MKFS && !_FS_READONLY |
/*-----------------------------------------------------------------------*/ |
/* Create File System on the Drive */ |
/*-----------------------------------------------------------------------*/ |
#define N_ROOTDIR 512 /* Multiple of 32 and <= 2048 */ |
#define N_FATS 1 /* 1 or 2 */ |
#define MAX_SECTOR 64000000UL /* Maximum partition size */ |
#define MIN_SECTOR 2000UL /* Minimum partition size */ |
FRESULT f_mkfs ( |
BYTE drv, /* Logical drive number */ |
BYTE partition, /* Partitioning rule 0:FDISK, 1:SFD */ |
WORD allocsize /* Allocation unit size [bytes] */ |
) |
{ |
BYTE fmt, m, *tbl; |
DWORD b_part, b_fat, b_dir, b_data; /* Area offset (LBA) */ |
DWORD n_part, n_rsv, n_fat, n_dir; /* Area size */ |
DWORD n_clust, n; |
FATFS *fs; |
DSTATUS stat; |
/* Check validity of the parameters */ |
if (drv >= _DRIVES) return FR_INVALID_DRIVE; |
if (partition >= 2) return FR_MKFS_ABORTED; |
for (n = 512; n <= 32768U && n != allocsize; n <<= 1); |
if (n != allocsize) return FR_MKFS_ABORTED; |
/* Check mounted drive and clear work area */ |
fs = FatFs[drv]; |
if (!fs) return FR_NOT_ENABLED; |
fs->fs_type = 0; |
drv = LD2PD(drv); |
/* Get disk statics */ |
stat = disk_initialize(drv); |
if (stat & STA_NOINIT) return FR_NOT_READY; |
if (stat & STA_PROTECT) return FR_WRITE_PROTECTED; |
if (disk_ioctl(drv, GET_SECTOR_COUNT, &n_part) != RES_OK || n_part < MIN_SECTOR) |
return FR_MKFS_ABORTED; |
if (n_part > MAX_SECTOR) n_part = MAX_SECTOR; |
b_part = (!partition) ? 63 : 0; /* Boot sector */ |
n_part -= b_part; |
#if S_MAX_SIZ > 512 /* Check disk sector size */ |
if (disk_ioctl(drv, GET_SECTOR_SIZE, &SS(fs)) != RES_OK |
|| SS(fs) > S_MAX_SIZ |
|| SS(fs) > allocsize) |
return FR_MKFS_ABORTED; |
#endif |
allocsize /= SS(fs); /* Number of sectors per cluster */ |
/* Pre-compute number of clusters and FAT type */ |
n_clust = n_part / allocsize; |
fmt = FS_FAT12; |
if (n_clust >= 0xFF5) fmt = FS_FAT16; |
if (n_clust >= 0xFFF5) fmt = FS_FAT32; |
/* Determine offset and size of FAT structure */ |
switch (fmt) { |
case FS_FAT12: |
n_fat = ((n_clust * 3 + 1) / 2 + 3 + SS(fs) - 1) / SS(fs); |
n_rsv = 1 + partition; |
n_dir = N_ROOTDIR * 32 / SS(fs); |
break; |
case FS_FAT16: |
n_fat = ((n_clust * 2) + 4 + SS(fs) - 1) / SS(fs); |
n_rsv = 1 + partition; |
n_dir = N_ROOTDIR * 32 / SS(fs); |
break; |
default: |
n_fat = ((n_clust * 4) + 8 + SS(fs) - 1) / SS(fs); |
n_rsv = 33 - partition; |
n_dir = 0; |
} |
b_fat = b_part + n_rsv; /* FATs start sector */ |
b_dir = b_fat + n_fat * N_FATS; /* Directory start sector */ |
b_data = b_dir + n_dir; /* Data start sector */ |
/* Align data start sector to erase block boundary (for flash memory media) */ |
if (disk_ioctl(drv, GET_BLOCK_SIZE, &n) != RES_OK) return FR_MKFS_ABORTED; |
n = (b_data + n - 1) & ~(n - 1); |
n_fat += (n - b_data) / N_FATS; |
/* b_dir and b_data are no longer used below */ |
/* Determine number of cluster and final check of validity of the FAT type */ |
n_clust = (n_part - n_rsv - n_fat * N_FATS - n_dir) / allocsize; |
if ( (fmt == FS_FAT16 && n_clust < 0xFF5) |
|| (fmt == FS_FAT32 && n_clust < 0xFFF5)) |
return FR_MKFS_ABORTED; |
/* Create partition table if needed */ |
if (!partition) { |
DWORD n_disk = b_part + n_part; |
tbl = &fs->win[MBR_Table]; |
ST_DWORD(&tbl[0], 0x00010180); /* Partition start in CHS */ |
if (n_disk < 63UL * 255 * 1024) { /* Partition end in CHS */ |
n_disk = n_disk / 63 / 255; |
tbl[7] = (BYTE)n_disk; |
tbl[6] = (BYTE)((n_disk >> 2) | 63); |
} else { |
ST_WORD(&tbl[6], 0xFFFF); |
} |
tbl[5] = 254; |
if (fmt != FS_FAT32) /* System ID */ |
tbl[4] = (n_part < 0x10000) ? 0x04 : 0x06; |
else |
tbl[4] = 0x0c; |
ST_DWORD(&tbl[8], 63); /* Partition start in LBA */ |
ST_DWORD(&tbl[12], n_part); /* Partition size in LBA */ |
ST_WORD(&tbl[64], 0xAA55); /* Signature */ |
if (disk_write(drv, fs->win, 0, 1) != RES_OK) |
return FR_RW_ERROR; |
} |
/* Create boot record */ |
tbl = fs->win; /* Clear buffer */ |
memset(tbl, 0, SS(fs)); |
ST_DWORD(&tbl[BS_jmpBoot], 0x90FEEB); /* Boot code (jmp $, nop) */ |
ST_WORD(&tbl[BPB_BytsPerSec], SS(fs)); /* Sector size */ |
tbl[BPB_SecPerClus] = (BYTE)allocsize; /* Sectors per cluster */ |
ST_WORD(&tbl[BPB_RsvdSecCnt], n_rsv); /* Reserved sectors */ |
tbl[BPB_NumFATs] = N_FATS; /* Number of FATs */ |
ST_WORD(&tbl[BPB_RootEntCnt], SS(fs) / 32 * n_dir); /* Number of rootdir entries */ |
if (n_part < 0x10000) { /* Number of total sectors */ |
ST_WORD(&tbl[BPB_TotSec16], n_part); |
} else { |
ST_DWORD(&tbl[BPB_TotSec32], n_part); |
} |
tbl[BPB_Media] = 0xF8; /* Media descripter */ |
ST_WORD(&tbl[BPB_SecPerTrk], 63); /* Number of sectors per track */ |
ST_WORD(&tbl[BPB_NumHeads], 255); /* Number of heads */ |
ST_DWORD(&tbl[BPB_HiddSec], b_part); /* Hidden sectors */ |
n = get_fattime(); /* Use current time as a VSN */ |
if (fmt != FS_FAT32) { |
ST_DWORD(&tbl[BS_VolID], n); /* Volume serial number */ |
ST_WORD(&tbl[BPB_FATSz16], n_fat); /* Number of secters per FAT */ |
tbl[BS_DrvNum] = 0x80; /* Drive number */ |
tbl[BS_BootSig] = 0x29; /* Extended boot signature */ |
memcpy(&tbl[BS_VolLab], "NO NAME FAT ", 19); /* Volume lavel, FAT signature */ |
} else { |
ST_DWORD(&tbl[BS_VolID32], n); /* Volume serial number */ |
ST_DWORD(&tbl[BPB_FATSz32], n_fat); /* Number of secters per FAT */ |
ST_DWORD(&tbl[BPB_RootClus], 2); /* Root directory cluster (2) */ |
ST_WORD(&tbl[BPB_FSInfo], 1); /* FSInfo record (bs+1) */ |
ST_WORD(&tbl[BPB_BkBootSec], 6); /* Backup boot record (bs+6) */ |
tbl[BS_DrvNum32] = 0x80; /* Drive number */ |
tbl[BS_BootSig32] = 0x29; /* Extended boot signature */ |
memcpy(&tbl[BS_VolLab32], "NO NAME FAT32 ", 19); /* Volume lavel, FAT signature */ |
} |
ST_WORD(&tbl[BS_55AA], 0xAA55); /* Signature */ |
if (disk_write(drv, tbl, b_part+0, 1) != RES_OK) |
return FR_RW_ERROR; |
if (fmt == FS_FAT32) |
disk_write(drv, tbl, b_part+6, 1); |
/* Initialize FAT area */ |
for (m = 0; m < N_FATS; m++) { |
memset(tbl, 0, SS(fs)); /* 1st sector of the FAT */ |
if (fmt != FS_FAT32) { |
n = (fmt == FS_FAT12) ? 0x00FFFFF8 : 0xFFFFFFF8; |
ST_DWORD(&tbl[0], n); /* Reserve cluster #0-1 (FAT12/16) */ |
} else { |
ST_DWORD(&tbl[0], 0xFFFFFFF8); /* Reserve cluster #0-1 (FAT32) */ |
ST_DWORD(&tbl[4], 0xFFFFFFFF); |
ST_DWORD(&tbl[8], 0x0FFFFFFF); /* Reserve cluster #2 for root dir */ |
} |
if (disk_write(drv, tbl, b_fat++, 1) != RES_OK) |
return FR_RW_ERROR; |
memset(tbl, 0, SS(fs)); /* Following FAT entries are filled by zero */ |
for (n = 1; n < n_fat; n++) { |
if (disk_write(drv, tbl, b_fat++, 1) != RES_OK) |
return FR_RW_ERROR; |
} |
} |
/* Initialize Root directory */ |
m = (BYTE)((fmt == FS_FAT32) ? allocsize : n_dir); |
do { |
if (disk_write(drv, tbl, b_fat++, 1) != RES_OK) |
return FR_RW_ERROR; |
} while (--m); |
/* Create FSInfo record if needed */ |
if (fmt == FS_FAT32) { |
ST_WORD(&tbl[BS_55AA], 0xAA55); |
ST_DWORD(&tbl[FSI_LeadSig], 0x41615252); |
ST_DWORD(&tbl[FSI_StrucSig], 0x61417272); |
ST_DWORD(&tbl[FSI_Free_Count], n_clust - 1); |
ST_DWORD(&tbl[FSI_Nxt_Free], 0xFFFFFFFF); |
disk_write(drv, tbl, b_part+1, 1); |
disk_write(drv, tbl, b_part+7, 1); |
} |
return (disk_ioctl(drv, CTRL_SYNC, NULL) == RES_OK) ? FR_OK : FR_RW_ERROR; |
} |
#endif /* _USE_MKFS && !_FS_READONLY */ |
#if _USE_STRFUNC >= 1 |
/*-----------------------------------------------------------------------*/ |
/* Get a string from the file */ |
/*-----------------------------------------------------------------------*/ |
char* fgets ( |
char* buff, /* Pointer to the string buffer to read */ |
int len, /* Size of string buffer */ |
FIL* fil /* Pointer to the file object */ |
) |
{ |
int i = 0; |
char *p = buff; |
UINT rc; |
while (i < len - 1) { /* Read bytes until buffer gets filled */ |
f_read(fil, p, 1, &rc); |
if (rc != 1) break; /* Break when no data to read */ |
#if _USE_STRFUNC >= 2 |
if (*p == '\r') continue; /* Strip '\r' */ |
#endif |
i++; |
if (*p++ == '\n') break; /* Break when reached end of line */ |
} |
*p = 0; |
return i ? buff : 0; /* When no data read (eof or error), return with error. */ |
} |
#if !_FS_READONLY |
#include <stdarg.h> |
/*-----------------------------------------------------------------------*/ |
/* Put a character to the file */ |
/*-----------------------------------------------------------------------*/ |
int fputc ( |
int chr, /* A character to be output */ |
FIL* fil /* Ponter to the file object */ |
) |
{ |
UINT bw; |
char c; |
#if _USE_STRFUNC >= 2 |
if (chr == '\n') fputc ('\r', fil); /* LF -> CRLF conversion */ |
#endif |
if (!fil) { /* Special value may be used to switch the destination to any other device */ |
/* put_console(chr); */ |
return chr; |
} |
c = (char)chr; |
f_write(fil, &c, 1, &bw); /* Write a byte to the file */ |
return bw ? chr : EOF; /* Return the resulut */ |
} |
/*-----------------------------------------------------------------------*/ |
/* Put a string to the file */ |
/*-----------------------------------------------------------------------*/ |
int fputs ( |
const char* str, /* Pointer to the string to be output */ |
FIL* fil /* Pointer to the file object */ |
) |
{ |
int n; |
for (n = 0; *str; str++, n++) { |
if (fputc(*str, fil) == EOF) return EOF; |
} |
return n; |
} |
/*-----------------------------------------------------------------------*/ |
/* Put a formatted string to the file */ |
/*-----------------------------------------------------------------------*/ |
int fprintf ( |
FIL* fil, /* Pointer to the file object */ |
const char* str, /* Pointer to the format string */ |
... /* Optional arguments... */ |
) |
{ |
va_list arp; |
UCHAR c, f, r; |
ULONG val; |
char s[16]; |
int i, w, res, cc; |
va_start(arp, str); |
for (cc = res = 0; cc != EOF; res += cc) { |
c = *str++; |
if (c == 0) break; /* End of string */ |
if (c != '%') { /* Non escape cahracter */ |
cc = fputc(c, fil); |
if (cc != EOF) cc = 1; |
continue; |
} |
w = f = 0; |
c = *str++; |
if (c == '0') { /* Flag: '0' padding */ |
f = 1; c = *str++; |
} |
while (c >= '0' && c <= '9') { /* Precision */ |
w = w * 10 + (c - '0'); |
c = *str++; |
} |
if (c == 'l') { /* Prefix: Size is long int */ |
f |= 2; c = *str++; |
} |
if (c == 's') { /* Type is string */ |
cc = fputs(va_arg(arp, char*), fil); |
continue; |
} |
if (c == 'c') { /* Type is character */ |
cc = fputc(va_arg(arp, char), fil); |
if (cc != EOF) cc = 1; |
continue; |
} |
r = 0; |
if (c == 'd') r = 10; /* Type is signed decimal */ |
if (c == 'u') r = 10; /* Type is unsigned decimal */ |
if (c == 'X') r = 16; /* Type is unsigned hexdecimal */ |
if (r == 0) break; /* Unknown type */ |
if (f & 2) { /* Get the value */ |
val = (ULONG)va_arg(arp, long); |
} else { |
val = (c == 'd') ? (ULONG)(long)va_arg(arp, int) : (ULONG)va_arg(arp, unsigned int); |
} |
/* Put numeral string */ |
if (c == 'd') { |
if (val >= 0x80000000) { |
val = 0 - val; |
f |= 4; |
} |
} |
i = sizeof(s) - 1; s[i] = 0; |
do { |
c = (UCHAR)(val % r + '0'); |
if (c > '9') c += 7; |
s[--i] = c; |
val /= r; |
} while (i && val); |
if (i && (f & 4)) s[--i] = '-'; |
w = sizeof(s) - 1 - w; |
while (i && i > w) s[--i] = (f & 1) ? '0' : ' '; |
cc = fputs(&s[i], fil); |
} |
va_end(arp); |
return (cc == EOF) ? cc : res; |
} |
#endif /* !_FS_READONLY */ |
#endif /* _USE_STRFUNC >= 1*/ |
/Designs/Data_loggers/DOGFINDER01A/SW/ATMEGA168/ff.h |
---|
0,0 → 1,339 |
/*--------------------------------------------------------------------------/ |
/ FatFs - FAT file system module include file R0.06 (C)ChaN, 2008 |
/---------------------------------------------------------------------------/ |
/ FatFs module is an experimenal project to implement FAT file system to |
/ cheap microcontrollers. This is a free software and is opened for education, |
/ research and development under license policy of following trems. |
/ |
/ Copyright (C) 2008, ChaN, all right reserved. |
/ |
/ * The FatFs module is a free software and there is no warranty. |
/ * You can use, modify and/or redistribute it for personal, non-profit or |
/ commercial use without any restriction under your responsibility. |
/ * Redistributions of source code must retain the above copyright notice. |
/ |
/---------------------------------------------------------------------------*/ |
#ifndef _FATFS |
#define _MCU_ENDIAN 0 |
/* The _MCU_ENDIAN defines which access method is used to the FAT structure. |
/ 1: Enable word access. |
/ 2: Disable word access and use byte-by-byte access instead. |
/ When the architectural byte order of the MCU is big-endian and/or address |
/ miss-aligned access results incorrect behavior, the _MCU_ENDIAN must be set to 2. |
/ If it is not the case, it can also be set to 1 for good code efficiency. */ |
#define _FS_READONLY 0 |
/* Setting _FS_READONLY to 1 defines read only configuration. This removes |
/ writing functions, f_write, f_sync, f_unlink, f_mkdir, f_chmod, f_rename, |
/ f_truncate and useless f_getfree. */ |
#define _FS_MINIMIZE 0 |
/* The _FS_MINIMIZE option defines minimization level to remove some functions. |
/ 0: Full function. |
/ 1: f_stat, f_getfree, f_unlink, f_mkdir, f_chmod, f_truncate and f_rename are removed. |
/ 2: f_opendir and f_readdir are removed in addition to level 1. |
/ 3: f_lseek is removed in addition to level 2. */ |
#define _USE_STRFUNC 0 |
/* To enable string functions, set _USE_STRFUNC to 1 or 2. */ |
#define _USE_MKFS 0 |
/* When _USE_MKFS is set to 1 and _FS_READONLY is set to 0, f_mkfs function is |
/ enabled. */ |
#define _DRIVES 2 |
/* Number of logical drives to be used. This affects the size of internal table. */ |
#define _MULTI_PARTITION 0 |
/* When _MULTI_PARTITION is set to 0, each logical drive is bound to same |
/ physical drive number and can mount only 1st primaly partition. When it is |
/ set to 1, each logical drive can mount a partition listed in Drives[]. */ |
#define _USE_FSINFO 0 |
/* To enable FSInfo support on FAT32 volume, set _USE_FSINFO to 1. */ |
#define _USE_SJIS 1 |
/* When _USE_SJIS is set to 1, Shift-JIS code transparency is enabled, otherwise |
/ only US-ASCII(7bit) code can be accepted as file/directory name. */ |
#define _USE_NTFLAG 1 |
/* When _USE_NTFLAG is set to 1, upper/lower case of the file name is preserved. |
/ Note that the files are always accessed in case insensitive. */ |
#include "integer.h" |
/* Definitions corresponds to multiple sector size (not tested) */ |
#define S_MAX_SIZ 512U /* Do not change */ |
#if S_MAX_SIZ > 512U |
#define SS(fs) ((fs)->s_size) |
#else |
#define SS(fs) 512U |
#endif |
/* File system object structure */ |
typedef struct _FATFS { |
WORD id; /* File system mount ID */ |
WORD n_rootdir; /* Number of root directory entries */ |
DWORD winsect; /* Current sector appearing in the win[] */ |
DWORD sects_fat; /* Sectors per fat */ |
DWORD max_clust; /* Maximum cluster# + 1 */ |
DWORD fatbase; /* FAT start sector */ |
DWORD dirbase; /* Root directory start sector (cluster# for FAT32) */ |
DWORD database; /* Data start sector */ |
#if !_FS_READONLY |
DWORD last_clust; /* Last allocated cluster */ |
DWORD free_clust; /* Number of free clusters */ |
#if _USE_FSINFO |
DWORD fsi_sector; /* fsinfo sector */ |
BYTE fsi_flag; /* fsinfo dirty flag (1:must be written back) */ |
BYTE pad2; |
#endif |
#endif |
BYTE fs_type; /* FAT sub type */ |
BYTE csize; /* Number of sectors per cluster */ |
#if S_MAX_SIZ > 512U |
WORD s_size; /* Sector size */ |
#endif |
BYTE n_fats; /* Number of FAT copies */ |
BYTE drive; /* Physical drive number */ |
BYTE winflag; /* win[] dirty flag (1:must be written back) */ |
BYTE pad1; |
BYTE win[S_MAX_SIZ]; /* Disk access window for Directory/FAT */ |
} FATFS; |
/* Directory object structure */ |
typedef struct _DIR { |
WORD id; /* Owner file system mount ID */ |
WORD index; /* Current index */ |
FATFS* fs; /* Pointer to the owner file system object */ |
DWORD sclust; /* Start cluster */ |
DWORD clust; /* Current cluster */ |
DWORD sect; /* Current sector */ |
} DIR; |
/* File object structure */ |
typedef struct _FIL { |
WORD id; /* Owner file system mount ID */ |
BYTE flag; /* File status flags */ |
BYTE csect; /* Sector address in the cluster */ |
FATFS* fs; /* Pointer to the owner file system object */ |
DWORD fptr; /* File R/W pointer */ |
DWORD fsize; /* File size */ |
DWORD org_clust; /* File start cluster */ |
DWORD curr_clust; /* Current cluster */ |
DWORD curr_sect; /* Current sector */ |
#if _FS_READONLY == 0 |
DWORD dir_sect; /* Sector containing the directory entry */ |
BYTE* dir_ptr; /* Ponter to the directory entry in the window */ |
#endif |
BYTE buffer[S_MAX_SIZ]; /* File R/W buffer */ |
} FIL; |
/* File status structure */ |
typedef struct _FILINFO { |
DWORD fsize; /* Size */ |
WORD fdate; /* Date */ |
WORD ftime; /* Time */ |
BYTE fattrib; /* Attribute */ |
char fname[8+1+3+1]; /* Name (8.3 format) */ |
} FILINFO; |
/* Definitions corresponds to multi partition */ |
#if _MULTI_PARTITION != 0 /* Multiple partition cfg */ |
typedef struct _PARTITION { |
BYTE pd; /* Physical drive # (0-255) */ |
BYTE pt; /* Partition # (0-3) */ |
} PARTITION; |
extern |
const PARTITION Drives[]; /* Logical drive# to physical location conversion table */ |
#define LD2PD(drv) (Drives[drv].pd) /* Get physical drive# */ |
#define LD2PT(drv) (Drives[drv].pt) /* Get partition# */ |
#else /* Single partition cfg */ |
#define LD2PD(drv) (drv) /* Physical drive# is equal to logical drive# */ |
#define LD2PT(drv) 0 /* Always mounts the 1st partition */ |
#endif |
/* File function return code (FRESULT) */ |
typedef enum { |
FR_OK = 0, /* 0 */ |
FR_NOT_READY, /* 1 */ |
FR_NO_FILE, /* 2 */ |
FR_NO_PATH, /* 3 */ |
FR_INVALID_NAME, /* 4 */ |
FR_INVALID_DRIVE, /* 5 */ |
FR_DENIED, /* 6 */ |
FR_EXIST, /* 7 */ |
FR_RW_ERROR, /* 8 */ |
FR_WRITE_PROTECTED, /* 9 */ |
FR_NOT_ENABLED, /* 10 */ |
FR_NO_FILESYSTEM, /* 11 */ |
FR_INVALID_OBJECT, /* 12 */ |
FR_MKFS_ABORTED /* 13 */ |
} FRESULT; |
/*-----------------------------------------------------*/ |
/* FatFs module application interface */ |
FRESULT f_mount (BYTE, FATFS*); /* Mount/Unmount a logical drive */ |
FRESULT f_open (FIL*, const char*, BYTE); /* Open or create a file */ |
FRESULT f_read (FIL*, void*, UINT, UINT*); /* Read data from a file */ |
FRESULT f_write (FIL*, const void*, UINT, UINT*); /* Write data to a file */ |
FRESULT f_lseek (FIL*, DWORD); /* Move file pointer of a file object */ |
FRESULT f_close (FIL*); /* Close an open file object */ |
FRESULT f_opendir (DIR*, const char*); /* Open an existing directory */ |
FRESULT f_readdir (DIR*, FILINFO*); /* Read a directory item */ |
FRESULT f_stat (const char*, FILINFO*); /* Get file status */ |
FRESULT f_getfree (const char*, DWORD*, FATFS**); /* Get number of free clusters on the drive */ |
FRESULT f_truncate (FIL*); /* Truncate file */ |
FRESULT f_sync (FIL*); /* Flush cached data of a writing file */ |
FRESULT f_unlink (const char*); /* Delete an existing file or directory */ |
FRESULT f_mkdir (const char*); /* Create a new directory */ |
FRESULT f_chmod (const char*, BYTE, BYTE); /* Change file/dir attriburte */ |
FRESULT f_utime (const char*, const FILINFO*); /* Change file/dir timestamp */ |
FRESULT f_rename (const char*, const char*); /* Rename/Move a file or directory */ |
FRESULT f_mkfs (BYTE, BYTE, WORD); /* Create a file system on the drive */ |
#if _USE_STRFUNC |
#define feof(fp) ((fp)->fptr == (fp)->fsize) |
#define EOF -1 |
int fputc (int, FIL*); /* Put a character to the file */ |
int fputs (const char*, FIL*); /* Put a string to the file */ |
int fprintf (FIL*, const char*, ...); /* Put a formatted string to the file */ |
char* fgets (char*, int, FIL*); /* Get a string from the file */ |
#endif |
/* User defined function to give a current time to fatfs module */ |
DWORD get_fattime (void); /* 31-25: Year(0-127 org.1980), 24-21: Month(1-12), 20-16: Day(1-31) */ |
/* 15-11: Hour(0-23), 10-5: Minute(0-59), 4-0: Second(0-29 *2) */ |
/* File access control and file status flags (FIL.flag) */ |
#define FA_READ 0x01 |
#define FA_OPEN_EXISTING 0x00 |
#if _FS_READONLY == 0 |
#define FA_WRITE 0x02 |
#define FA_CREATE_NEW 0x04 |
#define FA_CREATE_ALWAYS 0x08 |
#define FA_OPEN_ALWAYS 0x10 |
#define FA__WRITTEN 0x20 |
#define FA__DIRTY 0x40 |
#endif |
#define FA__ERROR 0x80 |
/* FAT sub type (FATFS.fs_type) */ |
#define FS_FAT12 1 |
#define FS_FAT16 2 |
#define FS_FAT32 3 |
/* File attribute bits for directory entry */ |
#define AM_RDO 0x01 /* Read only */ |
#define AM_HID 0x02 /* Hidden */ |
#define AM_SYS 0x04 /* System */ |
#define AM_VOL 0x08 /* Volume label */ |
#define AM_LFN 0x0F /* LFN entry */ |
#define AM_DIR 0x10 /* Directory */ |
#define AM_ARC 0x20 /* Archive */ |
/* Offset of FAT structure members */ |
#define BS_jmpBoot 0 |
#define BS_OEMName 3 |
#define BPB_BytsPerSec 11 |
#define BPB_SecPerClus 13 |
#define BPB_RsvdSecCnt 14 |
#define BPB_NumFATs 16 |
#define BPB_RootEntCnt 17 |
#define BPB_TotSec16 19 |
#define BPB_Media 21 |
#define BPB_FATSz16 22 |
#define BPB_SecPerTrk 24 |
#define BPB_NumHeads 26 |
#define BPB_HiddSec 28 |
#define BPB_TotSec32 32 |
#define BS_55AA 510 |
#define BS_DrvNum 36 |
#define BS_BootSig 38 |
#define BS_VolID 39 |
#define BS_VolLab 43 |
#define BS_FilSysType 54 |
#define BPB_FATSz32 36 |
#define BPB_ExtFlags 40 |
#define BPB_FSVer 42 |
#define BPB_RootClus 44 |
#define BPB_FSInfo 48 |
#define BPB_BkBootSec 50 |
#define BS_DrvNum32 64 |
#define BS_BootSig32 66 |
#define BS_VolID32 67 |
#define BS_VolLab32 71 |
#define BS_FilSysType32 82 |
#define FSI_LeadSig 0 |
#define FSI_StrucSig 484 |
#define FSI_Free_Count 488 |
#define FSI_Nxt_Free 492 |
#define MBR_Table 446 |
#define DIR_Name 0 |
#define DIR_Attr 11 |
#define DIR_NTres 12 |
#define DIR_CrtTime 14 |
#define DIR_CrtDate 16 |
#define DIR_FstClusHI 20 |
#define DIR_WrtTime 22 |
#define DIR_WrtDate 24 |
#define DIR_FstClusLO 26 |
#define DIR_FileSize 28 |
/* Multi-byte word access macros */ |
#if _MCU_ENDIAN == 1 /* Use word access */ |
#define LD_WORD(ptr) (WORD)(*(WORD*)(BYTE*)(ptr)) |
#define LD_DWORD(ptr) (DWORD)(*(DWORD*)(BYTE*)(ptr)) |
#define ST_WORD(ptr,val) *(WORD*)(BYTE*)(ptr)=(WORD)(val) |
#define ST_DWORD(ptr,val) *(DWORD*)(BYTE*)(ptr)=(DWORD)(val) |
#elif _MCU_ENDIAN == 2 /* Use byte-by-byte access */ |
#define LD_WORD(ptr) (WORD)(((WORD)*(volatile BYTE*)((ptr)+1)<<8)|(WORD)*(volatile BYTE*)(ptr)) |
#define LD_DWORD(ptr) (DWORD)(((DWORD)*(volatile BYTE*)((ptr)+3)<<24)|((DWORD)*(volatile BYTE*)((ptr)+2)<<16)|((WORD)*(volatile BYTE*)((ptr)+1)<<8)|*(volatile BYTE*)(ptr)) |
#define ST_WORD(ptr,val) *(volatile BYTE*)(ptr)=(BYTE)(val); *(volatile BYTE*)((ptr)+1)=(BYTE)((WORD)(val)>>8) |
#define ST_DWORD(ptr,val) *(volatile BYTE*)(ptr)=(BYTE)(val); *(volatile BYTE*)((ptr)+1)=(BYTE)((WORD)(val)>>8); *(volatile BYTE*)((ptr)+2)=(BYTE)((DWORD)(val)>>16); *(volatile BYTE*)((ptr)+3)=(BYTE)((DWORD)(val)>>24) |
#else |
#error Do not forget to set _MCU_ENDIAN properly! |
#endif |
#define _FATFS |
#endif /* _FATFS */ |
/Designs/Data_loggers/DOGFINDER01A/SW/ATMEGA168/glg.hex |
---|
0,0 → 1,573 |
:100000000C9441000C945E000C945E000C945E0015 |
:100010000C945E000C945E000C945E000C945E00E8 |
:100020000C945E000C945E000C945E000C94C00274 |
:100030000C945E000C945E000C945E000C945E00C8 |
:100040000C945E000C945E000C94B5000C945E0061 |
:100050000C945E000C9460000C945E000C945E00A6 |
:100060000C945E000C945E00244750524D430024D3 |
:100070004750474741002E6C6F6700244750524D50 |
:10008000430011241FBECFEFD4E0DEBFCDBF11E08F |
:10009000A0E0B1E0EAEAF3E202C005900D92A630DA |
:1000A000B107D9F714E0A6E0B1E001C01D92AF336B |
:1000B000B107E1F70E9435010C94D3110C940000B4 |
:1000C0001F920F920FB60F9211242F933F938F938D |
:1000D000209178003091790080917C00203D31059D |
:1000E00070F4809109018F3030F08091650181605A |
:1000F0008093650106C08F5F8093090102C0109252 |
:10010000090181E02C32380770F0809108018F30AE |
:1001100030F0809165018E7F8093650106C08F5F0E |
:100120008093080102C01092080130936701209368 |
:10013000660182E480937C0080917C00309302020F |
:100140002093010281E480937C008FED80937A00FC |
:100150008F913F912F910F900FBE0F901F90189588 |
:1001600060E070E081EA96E308951F920F920FB667 |
:100170000F9211248F939F93EF93FF939091C6005A |
:1001800080916A01863988F48F5F80936A0180913B |
:100190006801E82FF0E0E859FE4F93838F5F8639BE |
:1001A00008F080E08093680105C08091650182605D |
:1001B00080936501FF91EF919F918F910F900FBEFA |
:1001C0000F901F90189590E051E448E901C090E02D |
:1001D0008091650180FD46C03091690180916A017E |
:1001E000882311F420E013C0E32FF0E0E859FE4F1C |
:1001F0002381E32FEF5FF89480916A01815080930F |
:100200006A017894E63908F0E0E0E09369018091B2 |
:10021000650181FF14C0F8941092C1001092690129 |
:100220001092680110926A015093C4004093C1007B |
:10023000809165018D7F809365017894C8CF2223DA |
:1002400039F2992319F4243209F0C2CFE92FF0E0F2 |
:10025000ED5EFE4F20839F5F2A3029F0923508F033 |
:10026000B6CFB6CF90E0892F0895A2E0B0E0EBE3DF |
:10027000F1E00C94A1118DE085B98EE284B98FE391 |
:1002800088B917B88EEA8BB982E58AB980E58CBD4A |
:1002900081E08DBD83ED90E3909389008093880089 |
:1002A0008AE08093810082E080936F0082E187BDC5 |
:1002B00082E484BD81E480937C008FED80937A009A |
:1002C00078946FE172E080E00E942709EE24FF2419 |
:1002D00034E6832E77247A9423E0C22E95E0D92E3B |
:1002E0005E010894A11CB11C82E3982E1092C100FB |
:1002F0002998809212018091650180FF02C080924E |
:100300001201809112018823B1F7299A709212018B |
:100310008091650180FD05C080E00E943D0F81FF56 |
:1003200002C07092120180911201882389F791E036 |
:100330000EC0C5BCD0921201809112018823E1F752 |
:1003400015BCD0921201809112018823E1F79150DF |
:1003500080F7F8941092C100109269011092680120 |
:1003600010926A0181E48093C40088E98093C100FF |
:10037000809165018D7F80936501789402C0EE24A1 |
:10038000FF240E94E300882309F4B0CF2BE730E07C |
:10039000A3E1B1E0F9012F5F3F4F9491992329F038 |
:1003A0008C91981771F41196F5CFE3E1F1E082E0BA |
:1003B0009081913220F331969C32D1F78150C1F770 |
:1003C0007F01E114F104E9F2F70180818134C9F67B |
:1003D000E3E1F1E089E09081913208F4A6C0319622 |
:1003E0009C32C9F78150B9F77F01309709F49DC05D |
:1003F000848195819093140180931301828193816C |
:10040000909316018093150180819181909318013A |
:100410008093170166E770E089E191E00E9437114F |
:1004200042E163E171E083E092E00E947F09892B61 |
:1004300009F07DC040910D0250910E0260910F02B3 |
:100440007091100283E092E00E94E404892B09F08D |
:100450006EC092E00EC0C5BCD09212018091120114 |
:100460008823E1F715BCD0921201809112018823F4 |
:10047000E1F7915080F73FC02FE630E0A3E1B1E013 |
:10048000F9012F5F3F4F9491992389F08C91981730 |
:1004900009F064C01196F4CF1196F9012F5F3F4F18 |
:1004A0009491992321F08C919817B1F311C0042FE6 |
:1004B00010E09501A80163E171E083E092E00E9401 |
:1004C000B606892BF9F489819A8108171907D1F4A6 |
:1004D0008091650182FF0FC083E092E00E94510687 |
:1004E000892B11F096E024C0F894809165018B7FF0 |
:1004F0008093650178940E94E300482F882309F0D7 |
:10050000BBCF31C095E014C0C5BC90921201809160 |
:1005100012018823E1F715BC90921201809112011B |
:100520008823E1F7915080F7E1CE93E001C094E099 |
:100530001092C100299833E029E135BD20931201C2 |
:10054000809112018823E1F715BC2093120180915C |
:1005500012018823E1F7915081F7FFCF28E630E0C0 |
:10056000A3E1B1E09ACF1092C100299883E092E014 |
:100570000E94A806892B11F097E0DACF91E0D2CF44 |
:100580001F920F920FB60F9211242F938F939F9368 |
:1005900080911201882319F081508093120180917B |
:1005A000060190910701019690930701809306013F |
:1005B0008055964448F010920701109206018091F0 |
:1005C00065018460809365010E9417119F918F914E |
:1005D0002F910F900FBE0F901F901895FC01009760 |
:1005E00069F0808191818617970741F480E00E942D |
:1005F0003D0F282F30E02170307002C02CE030E039 |
:10060000C9010895A0E0B0E0E8E0F3E00C94A01187 |
:100610004B015C01C0910A01D0910B01CC80DD80BF |
:10062000EE80FF80C616D706E806F90609F44EC02C |
:100630008F8D8823A1F180E2682E712C6C0E7D1EB7 |
:1006400001E0A7019601B30180E00E94A30F892B6E |
:10065000D9F51F8E8C899D89A0E0B0E02885398569 |
:100660004A855B85820F931FA41FB51FC816D90644 |
:10067000EA06FB06A0F41E8D10C08C899D89A0E0BF |
:10068000B0E0C80ED91EEA1EFB1E01E0A7019601CC |
:10069000B30180E00E94A30F1150123070F7811453 |
:1006A0009104A104B10491F0BE01605E7F4F01E0AE |
:1006B000A501940180E00E94440F892B29F48C82CB |
:1006C0009D82AE82BF8202C080E001C081E0CDB7D2 |
:1006D000DEB7EEE00C94BC11A0E0B0E0E2E7F3E09E |
:1006E0000C94A011EC014B01E0900A01F0900B0179 |
:1006F000F701A084B184C284D384848D813021F039 |
:10070000823009F072C05AC08E01000F111F0C0F09 |
:100710001D1F16950795B801672F7727669580E00E |
:1007200090E06A0D7B1D8C1D9D1D0E940203882395 |
:1007300009F45BC0D801B17051E0652E712C6C22B8 |
:100740007D22C0FF0AC0F701EA0FFB1F80A18F7056 |
:10075000982D9295907F982B01C0982DAE0DBF1DBE |
:10076000FD0190A3E801219681E0F701878FBE018A |
:10077000672F7727669580E090E06A0D7B1D8C1DC2 |
:100780009D1D0E940203882381F1DE01B170611476 |
:10079000710439F034E0969487943A95E1F7982DF6 |
:1007A00008C0F701EA0FFB1F90A1907F892D8F7081 |
:1007B000982BAE0DBF1DFD0190A313C06D2F7727A1 |
:1007C00080E090E06A0D7B1D8C1D9D1D0E94020340 |
:1007D000882359F0CC0FDD1FD170CE0DDF1D99A2FB |
:1007E00088A281E0F701878F01C080E0CDB7DEB736 |
:1007F000EEE00C94BC11A0E0B0E0E1E0F4E00C9479 |
:10080000A3118C01E0900A01F0900B018230910558 |
:1008100008F467C0E7018E899F890817190708F057 |
:1008200060C0A884B984CA84DB848C8D813021F0B7 |
:10083000823009F056C040C0E801CC0FDD1FC00F68 |
:10084000D11FD695C795BE01672F7727669580E0A3 |
:1008500090E06A0D7B1D8C1D9D1D0E940203882364 |
:1008600009F43FC0FE01F170EE0DFF1D90A021962E |
:10087000BE01672F7727669580E090E06A0D7B1DAB |
:100880008C1D9D1D0E940203882359F1292D30E003 |
:10089000D170EC0EFD1EF70190A180E0282B392BC2 |
:1008A00000FF07C0F90194E0F695E7959A95E1F706 |
:1008B0001AC0F901FF7017C0612F772780E090E020 |
:1008C0006A0D7B1D8C1D9D1D0E940203882349F02B |
:1008D000000F111F1170E00EF11EE701E8A1F9A150 |
:1008E00002C0E1E0F0E0CF01CDB7DEB7EBE00C9461 |
:1008F000BF11A0E0B0E0EFE7F4E00C94A4117C019C |
:10090000C0900A01D0900B01F601A688B788009725 |
:1009100049F4008D118D0230110588F00A151B0570 |
:1009200070F40FC00E94FB039C018230910508F413 |
:1009300040C08A159B0508F441C0870102C001E050 |
:1009400010E0E8012196CA15DB0528F002301105F8 |
:1009500098F1C2E0D0E0CE010E94FB039C01009719 |
:1009600039F08130910551F1C017D10759F724C0F2 |
:100970001C2F0D2F6FEF7FEFCE010E946C03882399 |
:10098000C1F0E114F10431F0BE01C7010E946C0313 |
:10099000882379F0F601108F018F828D938DFFEF00 |
:1009A0008F3F9F0721F00197F601938F828F9E0161 |
:1009B00005C021E030E002C020E030E0C901CDB741 |
:1009C000DEB7EAE00C94C011A0E0B0E0EAEEF4E09B |
:1009D0000C94A011EC017A018B016C807D80688100 |
:1009E0007981C3010E94EE024C01009709F0D6C044 |
:1009F0008A8187FDD0C0AA84BB84CC84DD84AE14F8 |
:100A0000BF04C006D10610F481FF02C0570168017F |
:100A10001E821F821886198681E08B83A114B1047F |
:100A2000C104D10409F49DC06E857F8561157105EF |
:100A300071F480E090E00E947904BC01813091055E |
:100A400009F4A6C09F878E87009709F48AC0F30136 |
:100A5000858DE82EFF2400E010E0F9E0EE0CFF1C8D |
:100A6000001F111FFA95D1F7798B688BEA14FB04EC |
:100A70000C051D0558F58A8181FF04C0CB010E9439 |
:100A8000790403C0CB010E94FB03BC010097E1F095 |
:100A90008130910509F47CC0F30186899789681734 |
:100AA000790708F075C08E819F81A885B9858E0D64 |
:100AB0009F1DA01FB11F8E839F83A887B987AE1883 |
:100AC000BF08C00AD10AD0CF57016801D601C501BD |
:100AD0000197A109B109E9E0B695A7959795879582 |
:100AE000EA95D1F7F82E00910A0110910B0162509E |
:100AF0007040F8018689978902976817790728F06E |
:100B000020E030E040E050E014C080E090E0F801E8 |
:100B1000258D30E040E050E00E945B119B01AC016C |
:100B2000F80180899189A289B389280F391F4A1F4A |
:100B30005B1F2F0D311D411D511D2A8B3B8B4C8B93 |
:100B40005D8BF301858D8F198B838E819F81A885A5 |
:100B5000B9858A0D9B1DAC1DBD1D8E839F83A88703 |
:100B6000B9876A8161FF1AC02E813F814885598506 |
:100B70008A859B85AC85BD8582179307A407B50739 |
:100B800068F42A873B874C875D8760626A8306C06A |
:100B90008A8180688A8368E0862E912CC401CDB753 |
:100BA000DEB7EEE00C94BC11EF92FF920F931F930F |
:100BB000CF93DF938C01C0910A01D0910B01FC010E |
:100BC000E280F3800894E11CF11CC7018F709070E3 |
:100BD000892B09F05BC082859385A485B585019634 |
:100BE000A11DB11D82879387A487B5874085518554 |
:100BF0004115510539F48A819B81E816F90608F4FC |
:100C000045C049C08D8D90E001979701A4E03695CD |
:100C10002795AA95E1F782239323892BB9F5CA0179 |
:100C20000E94FB03BC0182309105A8F18E899F8947 |
:100C30006817790780F5F80171876087C0910A010C |
:100C4000D0910B01625070408E899F89029768177E |
:100C5000790728F020E030E040E050E012C080E06A |
:100C600090E02D8D30E040E050E00E945B119B0150 |
:100C7000AC0188899989AA89BB89280F391F4A1F25 |
:100C80005B1FF8012287338744875587F801F38279 |
:100C9000E28281E001C080E0CDB7DEB7E6E00C94EF |
:100CA000C411EF92FF920F931F93CF93DF93EC0148 |
:100CB000688179818C819D810E94EE027C01009780 |
:100CC00009F040C08A8185FF3DC06E897F89888D8B |
:100CD000998D0E940203882391F10A8D1B8DF801E2 |
:100CE0008385806283878A859B85AC85BD85848F5B |
:100CF000958FA68FB78F8E859F85938F828F0E9449 |
:100D0000B000F801668B778B808F918F8A818F7D01 |
:100D10008A83E0910A01F0910B0181E0878F60E006 |
:100D200070E080E090E00E940203882341F040E000 |
:100D300050E063E080E00E941F10892B19F0B8E0BA |
:100D4000EB2EF12CC701CDB7DEB7E6E00C94C41151 |
:100D5000CF93DF93EC010E9451069C01009711F4A0 |
:100D60001D821C82C901DF91CF910895A0E0B0E0FF |
:100D7000ECEBF6E00C949D11EC01162F072F7A0195 |
:100D80003901AC80BD80F9011182108268817981BE |
:100D9000C5010E94EE024C01009709F03BC18A8117 |
:100DA00087FD35C181FD04C036E0832E912C32C110 |
:100DB0002A853B854C855D85C701A0E0B0E0820FA8 |
:100DC000931FA41FB51F82179307A407B50708F444 |
:100DD00021C1812F902F9C016901412C22E0522ECC |
:100DE00033243394F8C02E813F8148855985DA0138 |
:100DF000C9019170A070B0700097A105B10509F00C |
:100E0000B1C08B8181508B83882349F02A893B892B |
:100E10004C895D892F5F3F4F4F4F5F4F51C0211568 |
:100E200031054105510569F46E857F8561157105B0 |
:100E300089F480E090E00E947904BC019F878E874E |
:100E400005C0888999890E947904BC0161157105E2 |
:100E500009F4C5C06130710509F4D6C0F501868971 |
:100E600097896817790708F0CFC0798B688B009154 |
:100E70000A0110910B0162507040F8018689978930 |
:100E800002976817790728F020E030E040E050E052 |
:100E900014C080E090E0F801258D30E040E050E0A3 |
:100EA0000E945B119B01AC01F80180899189A289A4 |
:100EB000B389280F391F4A1F5B1FF501858D8B836E |
:100EC0002A8B3B8B4C8B5D8B0F2D069561F16B81D3 |
:100ED000102F601708F4162F012FB60180E00E9432 |
:100EE000A30F892B09F090C08B818F5F811B8B83AF |
:100EF000812F90E001979C01442737FD4095542FA6 |
:100F00008C010F5F1F4F8A899B89AC89BD89820F35 |
:100F1000931FA41FB51F8A8B9B8BAC8BBD8B102F8F |
:100F20000027110F3EC02E813F81488559858A8553 |
:100F30009B85AC85BD85281739074A075B0790F06C |
:100F400060E070E080E090E00E940203882309F4F2 |
:100F50005BC08A899B89AC89BD89F50184839583AF |
:100F6000A683B7836A897B898C899D890E94020345 |
:100F7000882309F449C02E813F813170C201821B50 |
:100F8000930B87018E159F0508F48C01205E3F4F5F |
:100F90002A0D3B1DA801B601C9010E944B11F501A4 |
:100FA000378EC00ED11EC801A0E0B0E02E813F8177 |
:100FB00048855985280F391F4A1F5B1F2E833F83A1 |
:100FC00048875987F30180819181800F911F918318 |
:100FD0008083E01AF10AE114F10409F004CF2E81B4 |
:100FE0003F81488559858A859B85AC85BD8582175B |
:100FF0009307A407B50720F42A873B874C875D87B2 |
:101000008A8180628A8306C08A8180688A8388E0B8 |
:10101000882E912CC401CDB7DEB7E1E10C94B91153 |
:10102000A0E0B0E0E6E1F8E00C949E11EC01162F90 |
:10103000072F7A0139018C809D80F901118210827D |
:1010400068817981C4010E94EE025C01009709F079 |
:10105000F8C08A8187FDF2C080FD04C076E0A72E2B |
:10106000B12CEFC02A853B854C855D858E819F81A3 |
:10107000A885B985281B390B4A0B5B0BC701A0E07B |
:10108000B0E0281739074A075B0708F47901812F78 |
:10109000902F9C016901412C62E0562EC7C02E8121 |
:1010A0003F8148855985DA01C9019170A070B070FF |
:1010B0000097A105B10509F084C08B8181508B8315 |
:1010C000882349F02A893B894C895D892F5F3F4FEE |
:1010D0004F4F5F4F43C0211531054105510519F4AC |
:1010E0006E857F8505C0888999890E94FB03BC01B4 |
:1010F0006230710508F49FC0F401868997896817EA |
:10110000790708F098C0798B688B00910A011091DB |
:101110000B0162507040F801868997890297681721 |
:10112000790728F020E030E040E050E014C080E093 |
:1011300090E0F801258D30E040E050E00E945B1126 |
:101140009B01AC01F80180899189A289B389280F9C |
:10115000391F4A1F5B1FF401858D8B832A8B3B8BC4 |
:101160004C8B5D8B0F2D069561F16B81102F6017F5 |
:1011700008F4162F012FB60180E00E94440F892B3E |
:1011800009F059C08B818F5F811B8B83812F90E089 |
:1011900001979C01442737FD4095542F8C010F5F28 |
:1011A0001F4F8A899B89AC89BD89820F931FA41F19 |
:1011B000B51F8A8B9B8BAC8BBD8B102F0027110F1B |
:1011C0001BC06A897B898C899D890E9402038823C0 |
:1011D00091F18E819F8191709201281B390B8701BB |
:1011E0002E153F0508F489018096880D991DA801E8 |
:1011F000BC01C6010E944B11C00ED11EC801A0E067 |
:10120000B0E02E813F8148855985280F391F4A1F3C |
:101210005B1F2E833F8348875987F301808191812B |
:10122000800F911F91838083E01AF10AE114F10489 |
:1012300009F035CF06C08A8180688A8348E0A42EF1 |
:10124000B12CC501CDB7DEB7E0E10C94BA11CF9354 |
:10125000DF93FB01882319F025E030E01DC0A09149 |
:101260000A01B0910B0170930B0160930A01109772 |
:1012700041F080E292E0ED019C0119922150304052 |
:10128000E1F7309739F080E292E0DF01EC011D9246 |
:101290002197E9F720E030E0C901DF91CF9108956F |
:1012A0000F93CF93DF939B01AC01C0910A01D091C2 |
:1012B0000B01BE01605E7F4F01E080E00E94440FA1 |
:1012C000892BC1F4C25EDD4F88819981CE51D24015 |
:1012D00085559A4A79F443E050E060E071E0CE0130 |
:1012E0008A5A9F4F0E943E119C0180E0232B19F0E7 |
:1012F00081E001C082E0DF91CF910F910895ADE1CF |
:10130000B0E0E5E8F9E00C949C119D8F8C8F3B01D7 |
:1013100080900A0190900B01FC011582148203C099 |
:101320000894611C711CF30180818032C9F38F32F3 |
:1013300019F40894611C711C8114910409F417C1FB |
:10134000F42FFF71FB8F142F1E71F401848D8823FD |
:1013500059F080E00E943D0F80FD06C0112309F482 |
:10136000ABC382FD07C1A8C380E292E0F4019C01F7 |
:10137000119221503040E1F780E00E94600E80FF22 |
:1013800003C021E030E08BC3112311F082FDF2C0D5 |
:1013900060E070E080E090E00E945009813021F030 |
:1013A000EE24FF2487011EC082EE91E0880E991E74 |
:1013B000F40180812EE13EEF820E931E882309F412 |
:1013C000DCC086EE91E0880E991EF401E080F18089 |
:1013D000028113812AE13EEF820E931EC801B701FC |
:1013E0000E945009882309F0C8C0F40183A594A580 |
:1013F0008050924009F0C1C0F40186A997A9BC01B0 |
:1014000080E090E0611571058105910569F424E49F |
:1014100030E0820E931EF40160817181828193819C |
:101420002CEB3FEF820E931EF401758B648B20A989 |
:10143000268F30E040E050E00E945B115B016C01C0 |
:10144000F40186A597A5A0E0B0E0E80EF91E0A1FFA |
:101450001B1FE086F1860287138785A5858F21A94A |
:1014600032A93383228383A994A97C0100E010E090 |
:10147000E114F1040105110569F480E490E0880E9F |
:10148000991EF401E080F1800281138180EC9FEFCE |
:10149000880E991EF40186A597A5A0E0B0E0E81A91 |
:1014A000F90A0A0B1B0BEA18FB080C091D09A4E03A |
:1014B00036952795AA95E1F7C901A0E0B0E0E81AB2 |
:1014C000F90A0A0B1B0B258D30E040E050E0C80103 |
:1014D000B7010E947A112E5F3F4F4F4F5F4FF401CB |
:1014E000378B268B283FFFE03F07F0E04F07F0E007 |
:1014F0005F0710F461E006C0285F3F4F4040504056 |
:10150000E0F562E0F4012085318542855385D601FE |
:10151000C501820F931FA41FB51F84879587A687D7 |
:10152000B7878281938174E0969587957A95E1F7E4 |
:10153000A0E0B0E0820F931FA41FB51F8A0D9B1D72 |
:10154000AC1DBD1D808B918BA28BB38B648F8FEFF5 |
:101550009FEF938F828F80910C0190910D010196E6 |
:1015600090930D0180930C0191838083A5C22AE0A2 |
:1015700030E095C229E030E092C22BE030E08FC22B |
:101580002E010894411C511C92E0292E312C4BE075 |
:1015900050E060E270E0C2010E94541120E048E097 |
:1015A00090E038E102C028E04BE0F30111913F01E7 |
:1015B000112311F01F3249F4222309F4C7C0392343 |
:1015C0003C87113009F044C0C1C0113208F4BEC0DC |
:1015D0001F3709F4BBC01E3241F490FDB7C022236F |
:1015E00009F4B4C02930F8F2B1C0123209F4AEC027 |
:1015F0001A3220F11D3208F4A9C01A33F8F0103461 |
:1016000008F4A4C090FD1AC01C3709F49FC0812FB4 |
:101610008B55833008F49AC0865E8A3128F44830AE |
:1016200011F4377F01C03F7E812F81568A3130F41B |
:101630001052483011F4986001C09061241708F0EE |
:1016400085C09E7FF201E20FF11D10832F5FADCFA9 |
:101650006F89788D898D9A8D0E940203882331F4D9 |
:1016600090E09C01590128E030E084C02F85388942 |
:101670002F70307085E0220F331F8A95E1F7F60155 |
:10168000E20FF31F80A18823E1F0853EA1F000E284 |
:10169000A02EB12CA20EB31EAC0CBD1CF50183858F |
:1016A000082F83FD08C04BE050E0B201C5010E9445 |
:1016B0003E11009751F0CE010D960E94D40588236B |
:1016C00039F6112309F049C04FC0112319F420E065 |
:1016D00030E050C004FF41C0F501E28CF38CFE8A7B |
:1016E000ED8A00910A0110910B01B7016250704020 |
:1016F000F8018689978902976817790728F020E012 |
:1017000030E040E050E014C080E090E0F801258D2A |
:1017100030E040E050E00E945B119B01AC01F80119 |
:1017200080899189A289B389280F391F4A1F5B1FBD |
:10173000FC8AEB8A2F8B388F498F5A8F388A2F86F5 |
:1017400026CF20E030E0AA24BB2414C080E090E043 |
:101750009C01590124E030E00DC080E090E09C0144 |
:10176000590123E030E006C080E090E09C0159017F |
:1017700022E030E0FB8D4F2F50E0CA018C71907059 |
:10178000892B09F441C12115310509F4D6C0223055 |
:10179000310509F084C160900A0170900B010B893A |
:1017A0001C890115110551F11E8B0D8BB80162507A |
:1017B0007040F3018689978902976817790728F0A6 |
:1017C00020E030E040E050E014C080E090E0F30121 |
:1017D000258D30E040E050E00E945B119B01AC01A0 |
:1017E000F30180899189A289B389280F391F4A1F83 |
:1017F0005B1F2F8B388F498F5A8F09C0F301848567 |
:101800009585A685B7858F8B988FA98FBA8F188AF3 |
:101810001F86BDE0EB2EF12CEC0EFD1E6F89788D3E |
:10182000898D9A8D0E940203882309F433C1EF85C4 |
:10183000F889EF70F070A5E0EE0FFF1FAA95E1F7B1 |
:10184000B0965301AE0EBF1EB097E60DF71D80A1F6 |
:10185000882309F44CC1853E09F449C1C7010E949F |
:10186000D4058823D9F60115110509F410C18D8915 |
:101870009E890E9479048C01009709F408C1813087 |
:10188000910509F407C160E070E080E090E00E94FB |
:101890000203882309F4FEC0A0900A01B0900B0156 |
:1018A000B80162507040F5018689978902976817E0 |
:1018B000790720F0CC24DD24760114C080E090E08C |
:1018C000F501258D30E040E050E00E945B116B0196 |
:1018D0007C01F50180899189A289B389C80ED91E3E |
:1018E000EA1EFB1EF301C482D582E682F782E0E2A3 |
:1018F000AE2EB12CA60CB71C80E092E0F5019C0145 |
:10190000119221503040E1F7F301158D10C001E034 |
:10191000A7019601B50180E00E94A30F892B09F071 |
:10192000B9C00894C11CD11CE11CF11C1150112339 |
:1019300071F781E0F301878FDAC0F2FF03C027E07F |
:1019400030E0ADC0A114B10409F4A1C0F501838554 |
:10195000817109F09CC043FF42C0C28CD38C138EAE |
:10196000128E148E158E168E178E81E0F401878FDD |
:101970002480358046805780E0900A01F0900B016A |
:1019800086011CC0C8010E94FB033C018130910507 |
:1019900009F480C060E070E0C8010E946C038823F5 |
:1019A00009F478C0F701828D938DFFEF8F3F9F0779 |
:1019B00021F00196F701938F828F83010230110588 |
:1019C00008F472C0F7018689978908171907D0F2C1 |
:1019D0006BC00894C108D108F401D18EC08EFB8D74 |
:1019E000F3FF22C080E2F50183870E94B000F50179 |
:1019F000668B778B808F918F66877787808B918BB3 |
:101A000081E0F401878F10C02115310509F047C02E |
:101A1000A114B10409F441C0F501838584FD3DC0E2 |
:101A200041FF02C080FD33C0F40184819581A6810D |
:101A3000B781EC8DFD8D868B978BA08FB18FB38E88 |
:101A4000A28E2B8D2283F501828D938DEC8DFD8DE1 |
:101A500097878687F501848D958DA68DB78DEC8D42 |
:101A6000FD8D82879387A487B5871682178210869B |
:101A7000118681E0838395828482F4018081918143 |
:101A8000EC8DFD8D9183808320E030E008C026E05E |
:101A900030E005C028E030E002C022E030E0C901BB |
:101AA0006D96E2E10C94B811C201B1010E940203EB |
:101AB000882309F08ECFEECFC0900A01D0900B01A1 |
:101AC000F601848595851C8A1B8A1E8A1D8AA0E0E2 |
:101AD000B0E08F8B988FA98FBA8F188A1F86DA8A09 |
:101AE000C98AF3018081882309F04ACD2ACE80E299 |
:101AF000F50111928A95E9F7D501FE0131968BE047 |
:101B000001900D928150E1F78C85F5018487FB8D62 |
:101B1000F860FB8F64CFFC018AE080930F019FEF98 |
:101B20009EBD0DB407FEFDCF8EB58F3F29F4809189 |
:101B30000F018823A9F722C08E3F01F59FEF9EBDBC |
:101B40000DB407FEFDCF8EB580839EBD0DB407FE9C |
:101B5000FDCF8EB581836250704011F03296EFCF89 |
:101B60008FEF8EBD0DB407FEFDCF8EB58FEF8EBD0E |
:101B70000DB407FEFDCF8EB581E0089580E0089595 |
:101B8000FC0182E3809310018FEF8EBD0DB407FE40 |
:101B9000FDCF8EB59FEF9EBD0DB407FEFDCF8EB578 |
:101BA0008F3F31F0809110018823A9F790E02EC07B |
:101BB0006EBD0DB407FEFDCF6D3F11F491E026C060 |
:101BC00090E080818EBD0DB407FEFDCF81818EBD7A |
:101BD0000DB407FEFDCF915011F03296F2CF8FEF8A |
:101BE0008EBD0DB407FEFDCF8FEF8EBD0DB407FE89 |
:101BF000FDCF8FEF8EBD0DB407FEFDCF8EB590E00B |
:101C00008F71853009F091E081E09827892F089540 |
:101C1000282F82E3809310018FEF8EBD0DB407FE55 |
:101C2000FDCF8EB59FEF9EBD0DB407FEFDCF8EB5E7 |
:101C30008F3F31F0809110018823A9F78FEF08952D |
:101C40002EBD0DB407FEFDCF872F9927AA27BB27EE |
:101C50008EBD0DB407FEFDCFCB01AA27BB278EBDDD |
:101C60000DB407FEFDCFBB27A72F962F852F8EBD66 |
:101C70000DB407FEFDCF4EBD0DB407FEFDCF2034E1 |
:101C800011F485E905C0283411F487E801C080E02B |
:101C90008EBD0DB407FEFDCF2C3431F48FEF8EBD19 |
:101CA0000DB407FEFDCF8EB59AE02FEF2EBD0DB41B |
:101CB00007FEFDCF8EB587FF02C09150B9F708959A |
:101CC000A4E0B0E0E6E6FEE00C94A811882311F051 |
:101CD00081E0CFC08091040181FDC9C08AE09FEFFF |
:101CE0009EBD0DB407FEFDCF2EB58150C9F72A98D1 |
:101CF00040E050E060E070E080E40E94080E813037 |
:101D000009F0A0C084E680930F014AEA51E060E048 |
:101D100070E088E40E94080E813009F054C07E0112 |
:101D20000894E11CF11C87019FEF9E012B5F3F4F40 |
:101D30009EBD0DB407FEFDCF8EB5F80181938F01D6 |
:101D4000E217F307A9F78B81813009F07BC08C8102 |
:101D50008A3A09F077C040E050E060E070E087E741 |
:101D60000E94080E823048F440E050E060E070E4E9 |
:101D700089E60E94080E882321F080910F018823B4 |
:101D800051F780910F01882309F45CC040E050E0D6 |
:101D900060E070E08AE70E94080E882309F052C0D4 |
:101DA0009FEF9EBD0DB407FEFDCF8EB5F701819369 |
:101DB0007F01E017F107A9F7898186FD02C012E0D3 |
:101DC00042C016E040C040E050E060E070E087E7CD |
:101DD0000E94080E823058F440E050E060E070E06D |
:101DE00089E60E94080E823010F412E001C011E072 |
:101DF000123079F440E050E060E070E087E70E9444 |
:101E0000080E823078F440E050E060E070E089E64F |
:101E100005C040E050E060E070E081E40E94080E00 |
:101E2000882321F080910F01882311F780910F0101 |
:101E3000882341F040E052E060E070E080E50E94DD |
:101E4000080E811110E0109311012A9A8FEF8EBDB8 |
:101E50000DB407FEFDCF8EB5112321F08091040152 |
:101E60008E7F03C080910401816080930401809182 |
:101E700004012496E6E00C94C411882311F081E05B |
:101E800008958091040108950F93CF93DF93EB01A0 |
:101E9000882309F051C0002309F44EC08091040149 |
:101EA00080FF03C023E030E049C08091110182FD32 |
:101EB00007C069E0220F331F441F551F6A95D1F7F1 |
:101EC0002A98013089F4BA01A90181E50E94080E1F |
:101ED000882321F560E072E0CE010E948B0D00E0C6 |
:101EE0008823E1F401E01AC0BA01A90182E50E9449 |
:101EF000080E882399F460E072E0CE010E948B0DF9 |
:101F0000882329F0015019F0C050DE4FF4CF40E093 |
:101F100050E060E070E08CE40E94080E2A9A8FEF97 |
:101F20008EBD0DB407FEFDCF8EB520E030E000235E |
:101F300029F021E030E002C024E030E0C901DF9167 |
:101F4000CF910F910895CF92DF92EF92FF920F936E |
:101F5000CF93DF93EB0169017A01882309F064C014 |
:101F6000002309F461C08091040180FF03C023E0D5 |
:101F700030E05CC08091040182FF03C022E030E0C9 |
:101F800055C08091110182FD07C079E0CC0CDD1CA9 |
:101F9000EE1CFF1C7A95D1F72A98013069F4B7013D |
:101FA000A60188E50E94080E882381F56EEFCE0118 |
:101FB0000E94C00D00E027C081FF0EC040E050E04D |
:101FC00060E070E087E70E94080E402F50E060E07C |
:101FD00070E087E50E94080EB701A60189E50E941E |
:101FE000080E882399F46CEFCE010E94C00D88235F |
:101FF00029F0015019F0C050DE4FF5CF6DEF80E0B1 |
:1020000090E00E94C00D882309F401E02A9A8FEF26 |
:102010008EBD0DB407FEFDCF8EB520E030E000236D |
:1020200029F021E030E002C024E030E0C901DF9176 |
:10203000CF910F91FF90EF90DF90CF900895A0E1A6 |
:10204000B0E0E5E2F0E10C94AA118A01882319F0CE |
:1020500024E030E0E7C02A98633009F47FC06430A0 |
:1020600028F4613079F0623051F472C06B3009F4B9 |
:1020700096C06C3009F4AAC06A3009F486C024E026 |
:1020800030E0C6C040E050E060E070E089E40E94CB |
:10209000080E882309F0B7C060E170E0CE01019618 |
:1020A0000E948B0D882309F4AEC0898182958695A4 |
:1020B000869583707A8549858130B1F4872F90E0C9 |
:1020C0000196342F20E0820F931FA0E0B0E02AE0B9 |
:1020D000880F991FAA1FBB1F2A95D1F7F80180838B |
:1020E0009183A283B38392C04295469546954370EF |
:1020F000288530E0220F331F220F331F240F311D9C |
:102100002F5F3F4F8F8190E083709070982F8827CA |
:10211000990F990F280F391F40E050E08E818F7082 |
:102120006B85661F6627661F860F8E5F7370770F3D |
:10213000870F90E0099704C0220F331F441F551FDB |
:102140008A95D2F7F80120833183428353835EC09E |
:1021500080E092E0FA019183808358C082E380930B |
:1021600010018FEF8EBD0DB407FEFDCF8EB59FEF32 |
:102170009EBD0DB407FEFDCF8EB58F3F09F446C05E |
:10218000809110018823A1F73EC08091040180FD59 |
:1021900047C040E050E060E070E089E409C0809111 |
:1021A000040180FD3DC040E050E060E070E08AE462 |
:1021B0000E94080E882339F560E170E0C8010E9492 |
:1021C0008B0D20E030E0882319F51DC080910401BB |
:1021D00080FD26C040E050E060E070E08AE70E94A9 |
:1021E000080E882381F4F8019FEF98012D5F3F4F7F |
:1021F0009EBD0DB407FEFDCF8EB58083E217F307B9 |
:1022000029F03196F5CF21E030E002C020E030E047 |
:102210002A9A8FEF8EBD0DB407FEFDCF8EB502C09A |
:1022200023E030E0C9016096E4E00C94C61180918F |
:102230000F01882319F0815080930F0180911001C4 |
:10224000882319F081508093100190910E0183B181 |
:10225000817080930E01981749F48091040190FFDA |
:1022600002C0836001C08D7F809304010895FB014B |
:10227000DC0105900D920020E1F70895FB01DC01DF |
:1022800004C08D910190801921F441505040C8F74D |
:10229000881B990B0895FB01DC0102C001900D928F |
:1022A00041505040D8F70895DC0101C06D93415072 |
:1022B0005040E0F70895629FD001739FF001829F24 |
:1022C000E00DF11D649FE00DF11D929FF00D839FC5 |
:1022D000F00D749FF00D659FF00D9927729FB00D62 |
:1022E000E11DF91F639FB00DE11DF91FBD01CF0175 |
:1022F00011240895A1E21A2EAA1BBB1BFD010DC0DB |
:10230000AA1FBB1FEE1FFF1FA217B307E407F507A5 |
:1023100020F0A21BB30BE40BF50B661F771F881F81 |
:10232000991F1A9469F760957095809590959B0117 |
:10233000AC01BD01CF0108952F923F924F925F9261 |
:102340006F927F928F929F92AF92BF92CF92DF92C5 |
:10235000EF92FF920F931F93CF93DF93CDB7DEB72A |
:10236000CA1BDB0B0FB6F894DEBF0FBECDBF0994BE |
:102370002A88398848885F846E847D848C849B8415 |
:10238000AA84B984C884DF80EE80FD800C811B8123 |
:10239000AA81B981CE0FD11D0FB6F894DEBF0FBE52 |
:0A23A000CDBFED010895F894FFCFC2 |
:0623AA0046415400010051 |
:00000001FF |
/Designs/Data_loggers/DOGFINDER01A/SW/ATMEGA168/integer.h |
---|
0,0 → 1,23 |
#ifndef _INTEGER |
typedef int INT; |
typedef unsigned int UINT; |
typedef char CHAR; |
typedef unsigned char UCHAR; |
typedef unsigned char BYTE; |
typedef short SHORT; |
typedef unsigned short USHORT; |
typedef unsigned short WORD; |
typedef long LONG; |
typedef unsigned long ULONG; |
typedef unsigned long DWORD; |
typedef unsigned char BOOL; |
#define FALSE 0 |
#define TRUE 1 |
#define _INTEGER |
#endif |
/Designs/Data_loggers/DOGFINDER01A/SW/ATMEGA168/main.c |
---|
0,0 → 1,393 |
/*---------------------------------------------------------------*/ |
/* GPS data logger R0.02 (C)ChaN, 2008 */ |
/*---------------------------------------------------------------*/ |
#include <avr/io.h> |
#include <avr/pgmspace.h> |
#include <avr/interrupt.h> |
#include <string.h> |
#include "tff.h" |
#include "diskio.h" |
#define SYSCLK 10000000UL |
#define BEEP_ON() TCCR0B=0b011 |
#define BEEP_OFF() TCCR0B=0b000 |
#define GPS_ON() PORTB|=0x02 |
#define GPS_OFF() PORTB&=0xFD |
#define DELAY(dly) for(Timer=dly;Timer;) |
#define VTH_LOW (WORD)(8000UL*100/3838) |
#define VTH_HIGH (WORD)(11500UL*100/3838) |
#define POWER_check 0b01000000 | 1 |
#define ANALOG_IN1 0b01000000 | 2 |
FATFS fatfs; /* File system object for each logical drive */ |
FIL file1; /* File object */ |
BYTE Buff[82]; /* File/Console buffer */ |
uint16_t battery; // battery voltage |
uint16_t intensity; // radiation intensity |
volatile BYTE Timer; /* 100Hz decrement timer */ |
volatile BYTE Stat; /* Status */ |
typedef struct _fifo { |
uint8_t idx_w; |
uint8_t idx_r; |
uint8_t count; |
uint8_t buff[150]; |
} FIFO; |
volatile FIFO rxfifo; |
/*---------------------------------------------------------*/ |
/* ADC interrupt */ |
/*---------------------------------------------------------*/ |
ISR(ADC_vect) |
{ |
WORD n; |
static BYTE l, h; |
n = ADC; |
if(ADMUX == POWER_check) |
{ |
if (n < VTH_LOW) { |
if (l >= 15) { |
Stat |= 0x01; |
} |
else {l++;} |
} |
else {l = 0;} |
if (n > VTH_HIGH) { |
if (h >= 15) { |
Stat &= 0xFE; |
} |
else {h++;} |
} |
else {h = 0;} |
battery = n; |
ADMUX = ANALOG_IN1; |
} |
if(ADMUX == ANALOG_IN1) |
{ |
intensity = n; |
ADMUX = POWER_check; |
} |
//!!!! |
//Stat &= 0xFE; |
ADCSRA = _BV(ADEN)|_BV(ADSC)|_BV(ADIF)|_BV(ADIE)|0b111; |
} |
/*---------------------------------------------------------*/ |
/* 100Hz timer interrupt generated by OC1A */ |
/*---------------------------------------------------------*/ |
ISR(TIMER1_COMPA_vect) |
{ |
BYTE n; |
static WORD ivt_sync; |
n = Timer; |
if (n) Timer = n - 1; |
if (++ivt_sync >= 180 * 100) { |
ivt_sync = 0; |
Stat |= 4; |
} |
disk_timerproc(); /* Drive timer procedure of low level disk I/O module */ |
} |
/*---------------------------------------------------------*/ |
/* User Provided Timer Function for FatFs module */ |
/*---------------------------------------------------------*/ |
/* This is a real time clock service to be called from */ |
/* FatFs module. Any valid time must be returned even if */ |
/* the system does not support a real time clock. */ |
DWORD get_fattime () |
{ |
return ((2007UL - 1980) << 25) /* Fixed to 2007.5.1, 00:00:00 */ |
| ((5UL) << 21) |
| ((1UL) << 16) |
| (0 << 11) |
| (0 << 5) |
| (0 >> 1); |
} |
/*--------------------------------------------------------------------------*/ |
/* UART control */ |
static |
void uart_init (void) |
{ |
cli(); |
UCSR0B = 0; |
rxfifo.idx_r = 0; |
rxfifo.idx_w = 0; |
rxfifo.count = 0; |
UBRR0L = SYSCLK/16/9600; // Enable USRAT0 in N81,4800bps |
UCSR0B = _BV(RXCIE0)|_BV(RXEN0)|_BV(TXEN0); |
Stat &= 0xFD; // Clear overflow flag |
sei(); |
} |
static |
void uart_stop (void) |
{ |
UCSR0B = 0; |
} |
/* Get a received character */ |
static |
uint8_t uart_get () |
{ |
uint8_t d, i; |
i = rxfifo.idx_r; |
if (rxfifo.count == 0) return 0; |
d = rxfifo.buff[i++]; |
cli(); |
rxfifo.count--; |
sei(); |
if(i >= sizeof(rxfifo.buff)) |
i = 0; |
rxfifo.idx_r = i; |
return d; |
+ |
+/* USART0 RXC interrupt */ |
+ISR(USART_RX_vect) |
+{ |
+ uint8_t d, n, i; |
+ |
+ |
+ d = UDR0; |
+ n = rxfifo.count; |
+ if(n < sizeof(rxfifo.buff)) { |
+ rxfifo.count = ++n; |
+ i = rxfifo.idx_w; |
+ rxfifo.buff[i++] = d; |
+ if(i >= sizeof(rxfifo.buff)) |
+ i = 0; |
+ rxfifo.idx_w = i; |
+ } else { |
+ Stat |= 2; |
+ } |
+} |
+ |
+ |
+ |
+/*----------------------------------------------------*/ |
+/* Get a line received from GPS module */ |
+/*----------------------------------------------------*/ |
+ |
+static |
+BYTE get_line (void) // 0: Power fail occured, >0: Number of bytes received. |
+{ |
+ BYTE c, i = 0; |
+ |
+ |
+ for (;;) { |
+ if (Stat & 1) return 0; // When power fail is detected, return with zero. |
+ c = uart_get(); |
+ if (Stat & 2) { // When buffer overflow has occured, restert to receive line. |
+ uart_init(); |
+ i = 0; c = 0; |
+ } |
+ if (!c || (i == 0 && c != '$')) continue; |
+ Buff[i++] = c; |
+ if (c == '\n') break; |
+ if (i >= sizeof(Buff)) i = 0; |
+ } |
+ return i; |
+} |
+ |
+ |
+ |
+/*--------------------------------------------------------------------------*/ |
+/* Controls */ |
+ |
+static |
+void beep (BYTE len, BYTE cnt) |
+{ |
+ while (cnt--) { |
+ BEEP_ON(); |
+ DELAY(len); |
+ BEEP_OFF(); |
+ DELAY(len); |
+ } |
+} |
+ |
+ |
+ |
+ |
+/* Compare sentence header string */ |
+static |
+BYTE gp_comp (BYTE *str1, const prog_uint8_t *str2) |
+{ |
+ BYTE c; |
+ |
+ do { |
+ c = pgm_read_byte(str2++); |
+ } while (c && c == *str1++); |
+ return c; |
+} |
+ |
+/* Get a column item */ |
+static |
+BYTE* gp_col ( /* Returns pointer to the item (returns a NULL when not found) */ |
+ const BYTE* buf, /* Pointer to the sentence */ |
+ BYTE col /* Column number (0 is the 1st item) */ |
+) { |
+ BYTE c; |
+ |
+ |
+ while (col) { |
+ do { |
+ c = *buf++; |
+ if (c <= ' ') return NULL; |
+ } while (c != ','); |
+ col--; |
+ } |
+ return (BYTE*)buf; |
+} |
+ |
+ |
+ |
+static |
+void ioinit (void) |
+{ |
+ PORTB = 0b00001101; // Port B |
+ DDRB = 0b00101110; |
+ PORTC = 0b00111111; // Port C |
+ DDRC = 0b00000000; |
+ PORTD = 0b10101110; // Port D |
+ DDRD = 0b01010010; |
+ |
+ SPCR = 0b01010000; /* Initialize SPI port (Mode 0) */ |
+ SPSR = 0b00000001; |
+ |
+ OCR1A = SYSCLK/8/100-1; // Timer1: 100Hz interval (OC1A) |
+ TCCR1B = 0b00001010; |
+ TIMSK1 = _BV(OCIE1A); // Enable TC1.oca interrupt |
+ |
+ OCR0A = SYSCLK/64/4000/2-1; // Timer0: 4kHz sound (OC0A) |
+ TCCR0A = 0b01000010; |
+ |
+ ADMUX = POWER_check; // Select ADC input |
+ ADCSRA = _BV(ADEN)|_BV(ADSC)|_BV(ADIF)|_BV(ADIE)|0b111; |
+ |
+ sei(); |
+} |
+ |
+ |
+ |
+/*-----------------------------------------------------------------------*/ |
+/* Main */ |
+ |
+ |
+int main () |
+{ |
+ BYTE b, err, *p = NULL; |
+ WORD s; |
+ |
+ |
+ ioinit(); |
+ f_mount(0, &fatfs); /* Enable file I/O layer */ |
+ |
+ for (;;) { |
+ uart_stop(); |
+ GPS_OFF(); |
+ Timer = 100; |
+ do { |
+ if (Stat & 1) Timer = 100; |
+ } while (Timer); |
+ |
+ GPS_ON(); |
+ Timer = 255; |
+ do { |
+ if ((Stat & 1) || (disk_status(0) & STA_NODISK)) Timer = 255; |
+ } while (Timer); |
+ |
+ beep(5, 1); // Single beep. Start to get current time. |
+ uart_init(); |
+ do { // Wait for valid RMC sentence. |
+ b = get_line(); |
+ if (!b) break; |
+ if (gp_comp(Buff, PSTR("$GPRMC"))) continue; |
+ p = gp_col(Buff,2); |
+ } while (!p || *p != 'A'); |
+ if (!b) continue; |
+ p = gp_col(Buff,9); // Open log file with the name of current date (YYMMDD.log in UTC). |
+ |
+ if (!p) {err = 3; break;} |
+ |
+ memcpy(&Buff[0], p+4, 2); |
+ memcpy(&Buff[2], p+2, 2); |
+ memcpy(&Buff[4], p+0, 2); |
+ strcpy_P(&Buff[6], PSTR(".log")); |
+ if (f_open(&file1, Buff, FA_OPEN_ALWAYS | FA_WRITE) || f_lseek(&file1, file1.fsize)) { err = 4; break; } |
+ |
+ beep(5, 2); // Two beeps. Start logging. |
+ err = 0; |
+ while ((b = get_line()) > 0) { |
+ if ( !gp_comp(Buff, PSTR("$GPGGA")) // Which sentence is logged? |
+ || !gp_comp(Buff, PSTR("$GPRMC")) |
+ // || !gp_comp(Buff, PSTR("$GPGSA")) |
+ // || !gp_comp(Buff, PSTR("$GPGLL")) |
+ // || !gp_comp(Buff, PSTR("$GPGSV")) |
+ // || !gp_comp(Buff, PSTR("$GPZDA")) |
+ // || !gp_comp(Buff, PSTR("$GPVTG")) |
+ ) |
+ { |
+ if (f_write(&file1, Buff, b, &s) || b != s) { err = 5; break; }; |
+ } |
+ if ((Stat & 4) == 0) continue; |
+ if (f_sync(&file1)) { err = 6; break; };// Synchronize the file in interval of 300 sec. |
+ cli(); Stat &= 0xFB; sei(); // Clear sync request |
+ } |
+ if (err) break; |
+ |
+ // Turn-off GPS power and close the log file by power supply is discharged. |
+ uart_stop(); |
+ GPS_OFF(); |
+ if (f_close(&file1)) { err = 7; break; }; |
+ |
+ // When a long beep is sounded, the shutdoun process has been succeeded. |
+ beep(50, 1); |
+ } |
+ |
+ // Unrecoverble error. Enter shutdown state. |
+ uart_stop(); |
+ GPS_OFF(); |
+ beep(25, err); |
+ for (;;); |
+} |
+ |
+ |
/Designs/Data_loggers/DOGFINDER01A/SW/ATMEGA168/mmc.c |
---|
0,0 → 1,487 |
/*-----------------------------------------------------------------------*/ |
/* MMC/SDC (in SPI mode) control module (C)ChaN, 2006 */ |
/*-----------------------------------------------------------------------*/ |
/* Only rcvr_spi(), xmit_spi(), disk_timerproc(), disk_initialize () and */ |
/* some macros are platform dependent. */ |
/*-----------------------------------------------------------------------*/ |
#include <avr/io.h> |
#include "diskio.h" |
/* Definitions for MMC/SDC command */ |
#define CMD0 (0x40+0) /* GO_IDLE_STATE */ |
#define CMD1 (0x40+1) /* SEND_OP_COND */ |
#define CMD8 (0x40+8) /* SEND_IF_COND */ |
#define CMD9 (0x40+9) /* SEND_CSD */ |
#define CMD10 (0x40+10) /* SEND_CID */ |
#define CMD12 (0x40+12) /* STOP_TRANSMISSION */ |
#define CMD16 (0x40+16) /* SET_BLOCKLEN */ |
#define CMD17 (0x40+17) /* READ_SINGLE_BLOCK */ |
#define CMD18 (0x40+18) /* READ_MULTIPLE_BLOCK */ |
#define CMD23 (0x40+23) /* SET_BLOCK_COUNT */ |
#define CMD24 (0x40+24) /* WRITE_BLOCK */ |
#define CMD25 (0x40+25) /* WRITE_MULTIPLE_BLOCK */ |
#define CMD41 (0x40+41) /* SEND_OP_COND (ACMD) */ |
#define CMD55 (0x40+55) /* APP_CMD */ |
#define CMD58 (0x40+58) /* READ_OCR */ |
/* Control signals (Platform dependent) */ |
#define SELECT() PORTB &= ~_BV(PB2) /* MMC CS = L */ |
#define DESELECT() PORTB |= _BV(PB2) /* MMC CS = H */ |
#define SOCKPORT PINB /* Socket contact port */ |
#define SOCKINS 0x01 /* Card detect switch (PB0) */ |
/*-------------------------------------------------------------------------- |
Module Private Functions |
---------------------------------------------------------------------------*/ |
static volatile |
DSTATUS Stat = STA_NOINIT; /* Disk status */ |
static volatile |
BYTE Timer1, Timer2; /* 100Hz decrement timer */ |
static |
BYTE CardType; /* b0:MMC, b1:SDC, b2:Block addressing */ |
/*-----------------------------------------------------------------------*/ |
/* Transmit a byte to MMC via SPI (Platform dependent) */ |
/*-----------------------------------------------------------------------*/ |
#define xmit_spi(dat) SPDR=(dat); loop_until_bit_is_set(SPSR,SPIF) |
/*-----------------------------------------------------------------------*/ |
/* Receive a byte from MMC via SPI (Platform dependent) */ |
/*-----------------------------------------------------------------------*/ |
static |
BYTE rcvr_spi (void) |
{ |
SPDR = 0xFF; |
loop_until_bit_is_set(SPSR, SPIF); |
return SPDR; |
} |
/* Alternative macro to receive data fast */ |
#define rcvr_spi_m(dst) SPDR=0xFF; loop_until_bit_is_set(SPSR,SPIF); *(dst)=SPDR |
/*-----------------------------------------------------------------------*/ |
/* Wait for card ready */ |
/*-----------------------------------------------------------------------*/ |
static |
BYTE wait_ready (void) |
{ |
BYTE res; |
Timer2 = 50; /* Wait for ready in timeout of 500ms */ |
rcvr_spi(); |
do |
res = rcvr_spi(); |
while ((res != 0xFF) && Timer2); |
return res; |
} |
/*-----------------------------------------------------------------------*/ |
/* Receive a data packet from MMC */ |
/*-----------------------------------------------------------------------*/ |
static |
BOOL rcvr_datablock ( |
BYTE *buff, /* Data buffer to store received data */ |
UINT btr /* Byte count (must be even number) */ |
) |
{ |
BYTE token; |
Timer1 = 10; |
do { /* Wait for data packet in timeout of 100ms */ |
token = rcvr_spi(); |
} while ((token == 0xFF) && Timer1); |
if(token != 0xFE) return FALSE; /* If not valid data token, retutn with error */ |
do { /* Receive the data block into buffer */ |
rcvr_spi_m(buff++); |
rcvr_spi_m(buff++); |
} while (btr -= 2); |
rcvr_spi(); /* Discard CRC */ |
rcvr_spi(); |
return TRUE; /* Return with success */ |
} |
/*-----------------------------------------------------------------------*/ |
/* Send a data packet to MMC */ |
/*-----------------------------------------------------------------------*/ |
#if _READONLY == 0 |
static |
BOOL xmit_datablock ( |
const BYTE *buff, /* 512 byte data block to be transmitted */ |
BYTE token /* Data/Stop token */ |
) |
{ |
BYTE resp, wc; |
if (wait_ready() != 0xFF) return FALSE; |
xmit_spi(token); /* Xmit data token */ |
if (token != 0xFD) { /* Is data token */ |
wc = 0; |
do { /* Xmit the 512 byte data block to MMC */ |
xmit_spi(*buff++); |
xmit_spi(*buff++); |
} while (--wc); |
xmit_spi(0xFF); /* CRC (Dummy) */ |
xmit_spi(0xFF); |
resp = rcvr_spi(); /* Reveive data response */ |
if ((resp & 0x1F) != 0x05) /* If not accepted, return with error */ |
return FALSE; |
} |
return TRUE; |
} |
#endif /* _READONLY */ |
/*-----------------------------------------------------------------------*/ |
/* Send a command packet to MMC */ |
/*-----------------------------------------------------------------------*/ |
static |
BYTE send_cmd ( |
BYTE cmd, /* Command byte */ |
DWORD arg /* Argument */ |
) |
{ |
BYTE n, res; |
if (wait_ready() != 0xFF) return 0xFF; |
/* Send command packet */ |
xmit_spi(cmd); /* Command */ |
xmit_spi((BYTE)(arg >> 24)); /* Argument[31..24] */ |
xmit_spi((BYTE)(arg >> 16)); /* Argument[23..16] */ |
xmit_spi((BYTE)(arg >> 8)); /* Argument[15..8] */ |
xmit_spi((BYTE)arg); /* Argument[7..0] */ |
n = 0; |
if (cmd == CMD0) n = 0x95; /* CRC for CMD0(0) */ |
if (cmd == CMD8) n = 0x87; /* CRC for CMD8(0x1AA) */ |
xmit_spi(n); |
/* Receive command response */ |
if (cmd == CMD12) rcvr_spi(); /* Skip a stuff byte when stop reading */ |
n = 10; /* Wait for a valid response in timeout of 10 attempts */ |
do |
res = rcvr_spi(); |
while ((res & 0x80) && --n); |
return res; /* Return with the response value */ |
} |
/*-------------------------------------------------------------------------- |
Public Functions |
---------------------------------------------------------------------------*/ |
/*-----------------------------------------------------------------------*/ |
/* Initialize Disk Drive */ |
/*-----------------------------------------------------------------------*/ |
DSTATUS disk_initialize ( |
BYTE drv /* Physical drive nmuber (0) */ |
) |
{ |
BYTE n, ty, ocr[4]; |
if (drv) return STA_NOINIT; /* Supports only single drive */ |
if (Stat & STA_NODISK) return Stat; /* No card in the socket */ |
for (n = 10; n; n--) rcvr_spi(); /* 80 dummy clocks */ |
SELECT(); /* CS = L */ |
ty = 0; |
if (send_cmd(CMD0, 0) == 1) { /* Enter Idle state */ |
Timer1 = 100; /* Initialization timeout of 1000 msec */ |
if (send_cmd(CMD8, 0x1AA) == 1) { /* SDC Ver2+ */ |
for (n = 0; n < 4; n++) ocr[n] = rcvr_spi(); |
if (ocr[2] == 0x01 && ocr[3] == 0xAA) { /* The card can work at vdd range of 2.7-3.6V */ |
do { |
if (send_cmd(CMD55, 0) <= 1 && send_cmd(CMD41, 1UL << 30) == 0) break; /* ACMD41 with HCS bit */ |
} while (Timer1); |
if (Timer1 && send_cmd(CMD58, 0) == 0) { /* Check CCS bit */ |
for (n = 0; n < 4; n++) ocr[n] = rcvr_spi(); |
ty = (ocr[0] & 0x40) ? 6 : 2; |
} |
} |
} else { /* SDC Ver1 or MMC */ |
ty = (send_cmd(CMD55, 0) <= 1 && send_cmd(CMD41, 0) <= 1) ? 2 : 1; /* SDC : MMC */ |
do { |
if (ty == 2) { |
if (send_cmd(CMD55, 0) <= 1 && send_cmd(CMD41, 0) == 0) break; /* ACMD41 */ |
} else { |
if (send_cmd(CMD1, 0) == 0) break; /* CMD1 */ |
} |
} while (Timer1); |
if (!Timer1 || send_cmd(CMD16, 512) != 0) /* Select R/W block length */ |
ty = 0; |
} |
} |
CardType = ty; |
DESELECT(); /* CS = H */ |
rcvr_spi(); /* Idle (Release DO) */ |
if (ty) { /* Initialization succeded */ |
Stat &= ~STA_NOINIT; /* Clear STA_NOINIT */ |
} else { /* Initialization failed */ |
Stat |= STA_NOINIT; /* Set STA_NOINIT */ |
} |
return Stat; |
} |
/*-----------------------------------------------------------------------*/ |
/* Get Disk Status */ |
/*-----------------------------------------------------------------------*/ |
DSTATUS disk_status ( |
BYTE drv /* Physical drive nmuber (0) */ |
) |
{ |
if (drv) return STA_NOINIT; /* Supports only single drive */ |
return Stat; |
} |
/*-----------------------------------------------------------------------*/ |
/* Read Sector(s) */ |
/*-----------------------------------------------------------------------*/ |
DRESULT disk_read ( |
BYTE drv, /* Physical drive nmuber (0) */ |
BYTE *buff, /* Pointer to the data buffer to store read data */ |
DWORD sector, /* Start sector number (LBA) */ |
BYTE count /* Sector count (1..255) */ |
) |
{ |
if (drv || !count) return RES_PARERR; |
if (Stat & STA_NOINIT) return RES_NOTRDY; |
if (!(CardType & 4)) sector *= 512; /* Convert to byte address if needed */ |
SELECT(); /* CS = L */ |
if (count == 1) { /* Single block read */ |
if ((send_cmd(CMD17, sector) == 0) /* READ_SINGLE_BLOCK */ |
&& rcvr_datablock(buff, 512)) |
count = 0; |
} |
else { /* Multiple block read */ |
if (send_cmd(CMD18, sector) == 0) { /* READ_MULTIPLE_BLOCK */ |
do { |
if (!rcvr_datablock(buff, 512)) break; |
buff += 512; |
} while (--count); |
send_cmd(CMD12, 0); /* STOP_TRANSMISSION */ |
} |
} |
DESELECT(); /* CS = H */ |
rcvr_spi(); /* Idle (Release DO) */ |
return count ? RES_ERROR : RES_OK; |
} |
/*-----------------------------------------------------------------------*/ |
/* Write Sector(s) */ |
/*-----------------------------------------------------------------------*/ |
#if _READONLY == 0 |
DRESULT disk_write ( |
BYTE drv, /* Physical drive nmuber (0) */ |
const BYTE *buff, /* Pointer to the data to be written */ |
DWORD sector, /* Start sector number (LBA) */ |
BYTE count /* Sector count (1..255) */ |
) |
{ |
if (drv || !count) return RES_PARERR; |
if (Stat & STA_NOINIT) return RES_NOTRDY; |
if (Stat & STA_PROTECT) return RES_WRPRT; |
if (!(CardType & 4)) sector *= 512; /* Convert to byte address if needed */ |
SELECT(); /* CS = L */ |
if (count == 1) { /* Single block write */ |
if ((send_cmd(CMD24, sector) == 0) /* WRITE_BLOCK */ |
&& xmit_datablock(buff, 0xFE)) |
count = 0; |
} |
else { /* Multiple block write */ |
if (CardType & 2) { |
send_cmd(CMD55, 0); send_cmd(CMD23, count); /* ACMD23 */ |
} |
if (send_cmd(CMD25, sector) == 0) { /* WRITE_MULTIPLE_BLOCK */ |
do { |
if (!xmit_datablock(buff, 0xFC)) break; |
buff += 512; |
} while (--count); |
if (!xmit_datablock(0, 0xFD)) /* STOP_TRAN token */ |
count = 1; |
} |
} |
DESELECT(); /* CS = H */ |
rcvr_spi(); /* Idle (Release DO) */ |
return count ? RES_ERROR : RES_OK; |
} |
#endif /* _READONLY */ |
/*-----------------------------------------------------------------------*/ |
/* Miscellaneous Functions */ |
/*-----------------------------------------------------------------------*/ |
DRESULT disk_ioctl ( |
BYTE drv, /* Physical drive nmuber (0) */ |
BYTE ctrl, /* Control code */ |
void *buff /* Buffer to send/receive data block */ |
) |
{ |
DRESULT res; |
BYTE n, csd[16], *ptr = buff; |
WORD csize; |
if (drv) return RES_PARERR; |
SELECT(); /* CS = L */ |
res = RES_ERROR; |
switch (ctrl) { |
case GET_SECTOR_COUNT : /* Get number of sectors on the disk (DWORD) */ |
if ((send_cmd(CMD9, 0) == 0) && rcvr_datablock(csd, 16)) { |
if ((csd[0] >> 6) == 1) { /* SDC ver 2.00 */ |
csize = csd[9] + ((WORD)csd[8] << 8) + 1; |
*(DWORD*)buff = (DWORD)csize << 10; |
} else { /* MMC or SDC ver 1.XX */ |
n = (csd[5] & 15) + ((csd[10] & 128) >> 7) + ((csd[9] & 3) << 1) + 2; |
csize = (csd[8] >> 6) + ((WORD)csd[7] << 2) + ((WORD)(csd[6] & 3) << 10) + 1; |
*(DWORD*)buff = (DWORD)csize << (n - 9); |
} |
res = RES_OK; |
} |
break; |
case GET_SECTOR_SIZE : /* Get sectors on the disk (WORD) */ |
*(WORD*)buff = 512; |
res = RES_OK; |
break; |
case CTRL_SYNC : /* Make sure that data has been written */ |
if (wait_ready() == 0xFF) |
res = RES_OK; |
break; |
case MMC_GET_CSD : /* Receive CSD as a data block (16 bytes) */ |
if (Stat & STA_NOINIT) return RES_NOTRDY; |
if ((send_cmd(CMD9, 0) == 0) /* READ_CSD */ |
&& rcvr_datablock(ptr, 16)) |
res = RES_OK; |
break; |
case MMC_GET_CID : /* Receive CID as a data block (16 bytes) */ |
if (Stat & STA_NOINIT) return RES_NOTRDY; |
if ((send_cmd(CMD10, 0) == 0) /* READ_CID */ |
&& rcvr_datablock(ptr, 16)) |
res = RES_OK; |
break; |
case MMC_GET_OCR : /* Receive OCR as an R3 resp (4 bytes) */ |
if (Stat & STA_NOINIT) return RES_NOTRDY; |
if (send_cmd(CMD58, 0) == 0) { /* READ_OCR */ |
for (n = 0; n < 4; n++) |
*ptr++ = rcvr_spi(); |
res = RES_OK; |
} |
break; |
default: |
res = RES_PARERR; |
} |
DESELECT(); /* CS = H */ |
rcvr_spi(); /* Idle (Release DO) */ |
return res; |
} |
/*---------------------------------------*/ |
/* Device timer interrupt procedure */ |
/* This must be called in period of 10ms */ |
/* (Platform dependent) */ |
void disk_timerproc (void) |
{ |
static BYTE pv; |
BYTE n, s; |
n = Timer1; /* 100Hz decrement timer */ |
if (n) Timer1 = --n; |
n = Timer2; |
if (n) Timer2 = --n; |
n = pv; |
pv = SOCKPORT & (SOCKINS); /* Sample socket switch */ |
if (n == pv) { /* Have contacts stabled? */ |
s = Stat; |
if (pv & SOCKINS) /* INS = H (Socket empty) */ |
s |= (STA_NODISK | STA_NOINIT); |
else /* INS = L (Card inserted) */ |
s &= ~STA_NODISK; |
Stat = s; |
} |
} |
/Designs/Data_loggers/DOGFINDER01A/SW/ATMEGA168/tff.c |
---|
0,0 → 1,1580 |
/*--------------------------------------------------------------------------/ |
/ FatFs - Tiny FAT file system module R0.04b (C)ChaN, 2007 |
/---------------------------------------------------------------------------/ |
/ The FatFs module is an experimenal project to implement FAT file system to |
/ cheap microcontrollers. This is a free software and is opened for education, |
/ research and development under license policy of following trems. |
/ |
/ Copyright (C) 2007, ChaN, all right reserved. |
/ |
/ * The FatFs module is a free software and there is no warranty. |
/ * You can use, modify and/or redistribute it for personal, non-profit or |
/ profit use without any restriction under your responsibility. |
/ * Redistributions of source code must retain the above copyright notice. |
/ |
/---------------------------------------------------------------------------/ |
/ Feb 26, 2006 R0.00 Prototype. |
/ Apr 29, 2006 R0.01 First stable version. |
/ Jun 01, 2006 R0.02 Added FAT12 support. |
/ Removed unbuffered mode. |
/ Fixed a problem on small (<32M) patition. |
/ Jun 10, 2006 R0.02a Added a configuration option (_FS_MINIMUM). |
/ Sep 22, 2006 R0.03 Added f_rename(). |
/ Changed option _FS_MINIMUM to _FS_MINIMIZE. |
/ Dec 09, 2006 R0.03a Improved cluster scan algolithm to write files fast. |
/ Feb 04, 2007 R0.04 Added FAT32 supprt. |
/ Changed some interfaces incidental to FatFs. |
/ Changed f_mountdrv() to f_mount(). |
/ Apr 01, 2007 R0.04a Added a capability of extending file size to f_lseek(). |
/ Added minimization level 3. |
/ Fixed a problem in FAT32 support. |
/ xxx xx, 2007 R0.04b Added a configuration option _USE_NTFLAG. |
/ Added FSInfo support. |
/ Fixed some problems corresponds to FAT32 support. |
/ Fixed DBCS name can result FR_INVALID_NAME. |
/ Fixed short seek (<= csize) collapses the file object. |
/---------------------------------------------------------------------------*/ |
#include <string.h> |
#include "tff.h" /* Tiny-FatFs declarations */ |
#include "diskio.h" /* Include file for user provided disk functions */ |
static |
FATFS *FatFs; /* Pointer to the file system objects (logical drive) */ |
static |
WORD fsid; /* File system mount ID */ |
/*------------------------------------------------------------------------- |
Module Private Functions |
-------------------------------------------------------------------------*/ |
/*-----------------------------------------------------------------------*/ |
/* Change window offset */ |
/*-----------------------------------------------------------------------*/ |
static |
BOOL move_window ( /* TRUE: successful, FALSE: failed */ |
DWORD sector /* Sector number to make apperance in the FatFs->win */ |
) /* Move to zero only writes back dirty window */ |
{ |
DWORD wsect; |
FATFS *fs = FatFs; |
wsect = fs->winsect; |
if (wsect != sector) { /* Changed current window */ |
#if !_FS_READONLY |
BYTE n; |
if (fs->winflag) { /* Write back dirty window if needed */ |
if (disk_write(0, fs->win, wsect, 1) != RES_OK) |
return FALSE; |
fs->winflag = 0; |
if (wsect < (fs->fatbase + fs->sects_fat)) { /* In FAT area */ |
for (n = fs->n_fats; n >= 2; n--) { /* Refrect the change to all FAT copies */ |
wsect += fs->sects_fat; |
disk_write(0, fs->win, wsect, 1); |
} |
} |
} |
#endif |
if (sector) { |
if (disk_read(0, fs->win, sector, 1) != RES_OK) |
return FALSE; |
fs->winsect = sector; |
} |
} |
return TRUE; |
} |
/*-----------------------------------------------------------------------*/ |
/* Clean-up cached data */ |
/*-----------------------------------------------------------------------*/ |
#if !_FS_READONLY |
static |
FRESULT sync (void) /* FR_OK: successful, FR_RW_ERROR: failed */ |
{ |
FATFS *fs = FatFs; |
fs->winflag = 1; |
if (!move_window(0)) return FR_RW_ERROR; |
#if _USE_FSINFO |
if (fs->fs_type == FS_FAT32 && fs->fsi_flag) { /* Update FSInfo sector if needed */ |
fs->winsect = 0; |
memset(fs->win, 0, 512); |
ST_WORD(&fs->win[BS_55AA], 0xAA55); |
ST_DWORD(&fs->win[FSI_LeadSig], 0x41615252); |
ST_DWORD(&fs->win[FSI_StrucSig], 0x61417272); |
ST_DWORD(&fs->win[FSI_Free_Count], fs->free_clust); |
ST_DWORD(&fs->win[FSI_Nxt_Free], fs->last_clust); |
disk_write(0, fs->win, fs->fsi_sector, 1); |
fs->fsi_flag = 0; |
} |
#endif |
if (disk_ioctl(0, CTRL_SYNC, NULL) != RES_OK) return FR_RW_ERROR; |
return FR_OK; |
} |
#endif |
/*-----------------------------------------------------------------------*/ |
/* Get a cluster status */ |
/*-----------------------------------------------------------------------*/ |
static |
CLUST get_cluster ( /* 0,>=2: successful, 1: failed */ |
CLUST clust /* Cluster# to get the link information */ |
) |
{ |
WORD wc, bc; |
DWORD fatsect; |
FATFS *fs = FatFs; |
if (clust >= 2 && clust < fs->max_clust) { /* Valid cluster# */ |
fatsect = fs->fatbase; |
switch (fs->fs_type) { |
case FS_FAT12 : |
bc = (WORD)clust * 3 / 2; |
if (!move_window(fatsect + bc / 512)) break; |
wc = fs->win[bc % 512]; bc++; |
if (!move_window(fatsect + bc / 512)) break; |
wc |= (WORD)fs->win[bc % 512] << 8; |
return (clust & 1) ? (wc >> 4) : (wc & 0xFFF); |
case FS_FAT16 : |
if (!move_window(fatsect + clust / 256)) break; |
return LD_WORD(&fs->win[((WORD)clust * 2) % 512]); |
#if _FAT32 |
case FS_FAT32 : |
if (!move_window(fatsect + clust / 128)) break; |
return LD_DWORD(&fs->win[((WORD)clust * 4) % 512]) & 0x0FFFFFFF; |
#endif |
} |
} |
return 1; /* There is no cluster information, or an error occured */ |
} |
/*-----------------------------------------------------------------------*/ |
/* Change a cluster status */ |
/*-----------------------------------------------------------------------*/ |
#if !_FS_READONLY |
static |
BOOL put_cluster ( /* TRUE: successful, FALSE: failed */ |
CLUST clust, /* Cluster# to change */ |
CLUST val /* New value to mark the cluster */ |
) |
{ |
WORD bc; |
BYTE *p; |
DWORD fatsect; |
FATFS *fs = FatFs; |
fatsect = fs->fatbase; |
switch (fs->fs_type) { |
case FS_FAT12 : |
bc = (WORD)clust * 3 / 2; |
if (!move_window(fatsect + bc / 512)) return FALSE; |
p = &fs->win[bc % 512]; |
*p = (clust & 1) ? ((*p & 0x0F) | ((BYTE)val << 4)) : (BYTE)val; |
bc++; |
fs->winflag = 1; |
if (!move_window(fatsect + bc / 512)) return FALSE; |
p = &fs->win[bc % 512]; |
*p = (clust & 1) ? (BYTE)(val >> 4) : ((*p & 0xF0) | ((BYTE)(val >> 8) & 0x0F)); |
break; |
case FS_FAT16 : |
if (!move_window(fatsect + clust / 256)) return FALSE; |
ST_WORD(&fs->win[((WORD)clust * 2) % 512], (WORD)val); |
break; |
#if _FAT32 |
case FS_FAT32 : |
if (!move_window(fatsect + clust / 128)) return FALSE; |
ST_DWORD(&fs->win[((WORD)clust * 4) % 512], val); |
break; |
#endif |
default : |
return FALSE; |
} |
fs->winflag = 1; |
return TRUE; |
} |
#endif /* !_FS_READONLY */ |
/*-----------------------------------------------------------------------*/ |
/* Remove a cluster chain */ |
/*-----------------------------------------------------------------------*/ |
#if !_FS_READONLY |
static |
BOOL remove_chain ( /* TRUE: successful, FALSE: failed */ |
CLUST clust /* Cluster# to remove chain from */ |
) |
{ |
CLUST nxt; |
FATFS *fs = FatFs; |
while (clust >= 2 && clust < fs->max_clust) { |
nxt = get_cluster(clust); |
if (nxt == 1) return FALSE; |
if (!put_cluster(clust, 0)) return FALSE; |
if (fs->free_clust != (CLUST)0xFFFFFFFF) { |
fs->free_clust++; |
#if _USE_FSINFO |
fs->fsi_flag = 1; |
#endif |
} |
clust = nxt; |
} |
return TRUE; |
} |
#endif |
/*-----------------------------------------------------------------------*/ |
/* Stretch or create a cluster chain */ |
/*-----------------------------------------------------------------------*/ |
#if !_FS_READONLY |
static |
CLUST create_chain ( /* 0: no free cluster, 1: error, >=2: new cluster number */ |
CLUST clust /* Cluster# to stretch, 0 means create new */ |
) |
{ |
CLUST cstat, ncl, scl, mcl; |
FATFS *fs = FatFs; |
mcl = fs->max_clust; |
if (clust == 0) { /* Create new chain */ |
scl = fs->last_clust; /* Get last allocated cluster */ |
if (scl < 2 || scl >= mcl) scl = 1; |
} |
else { /* Stretch existing chain */ |
cstat = get_cluster(clust); /* Check the cluster status */ |
if (cstat < 2) return 1; /* It is an invalid cluster */ |
if (cstat < mcl) return cstat; /* It is already followed by next cluster */ |
scl = clust; |
} |
ncl = scl; /* Start cluster */ |
for (;;) { |
ncl++; /* Next cluster */ |
if (ncl >= mcl) { /* Wrap around */ |
ncl = 2; |
if (ncl > scl) return 0; /* No free custer */ |
} |
cstat = get_cluster(ncl); /* Get the cluster status */ |
if (cstat == 0) break; /* Found a free cluster */ |
if (cstat == 1) return 1; /* Any error occured */ |
if (ncl == scl) return 0; /* No free custer */ |
} |
if (!put_cluster(ncl, (CLUST)0x0FFFFFFF)) return 1; /* Mark the new cluster "in use" */ |
if (clust && !put_cluster(clust, ncl)) return 1; /* Link it to previous one if needed */ |
fs->last_clust = ncl; /* Update fsinfo */ |
if (fs->free_clust != (CLUST)0xFFFFFFFF) { |
fs->free_clust--; |
#if _USE_FSINFO |
fs->fsi_flag = 1; |
#endif |
} |
return ncl; /* Return new cluster number */ |
} |
#endif /* !_FS_READONLY */ |
/*-----------------------------------------------------------------------*/ |
/* Get sector# from cluster# */ |
/*-----------------------------------------------------------------------*/ |
static |
DWORD clust2sect ( /* !=0: sector number, 0: failed - invalid cluster# */ |
CLUST clust /* Cluster# to be converted */ |
) |
{ |
FATFS *fs = FatFs; |
clust -= 2; |
if (clust >= (fs->max_clust - 2)) return 0; /* Invalid cluster# */ |
return (DWORD)clust * fs->sects_clust + fs->database; |
} |
/*-----------------------------------------------------------------------*/ |
/* Move directory pointer to next */ |
/*-----------------------------------------------------------------------*/ |
static |
BOOL next_dir_entry ( /* TRUE: successful, FALSE: could not move next */ |
DIR *dirobj /* Pointer to directory object */ |
) |
{ |
CLUST clust; |
WORD idx; |
FATFS *fs = FatFs; |
idx = dirobj->index + 1; |
if ((idx & 15) == 0) { /* Table sector changed? */ |
dirobj->sect++; /* Next sector */ |
if (!dirobj->clust) { /* In static table */ |
if (idx >= fs->n_rootdir) return FALSE; /* Reached to end of table */ |
} else { /* In dynamic table */ |
if (((idx / 16) & (fs->sects_clust - 1)) == 0) { /* Cluster changed? */ |
clust = get_cluster(dirobj->clust); /* Get next cluster */ |
if (clust < 2 || clust >= fs->max_clust) /* Reached to end of table */ |
return FALSE; |
dirobj->clust = clust; /* Initialize for new cluster */ |
dirobj->sect = clust2sect(clust); |
} |
} |
} |
dirobj->index = idx; /* Lower 4 bit of dirobj->index indicates offset in dirobj->sect */ |
return TRUE; |
} |
/*-----------------------------------------------------------------------*/ |
/* Get file status from directory entry */ |
/*-----------------------------------------------------------------------*/ |
#if _FS_MINIMIZE <= 1 |
static |
void get_fileinfo ( /* No return code */ |
FILINFO *finfo, /* Ptr to store the File Information */ |
const BYTE *dir /* Ptr to the directory entry */ |
) |
{ |
BYTE n, c, a; |
char *p; |
p = &finfo->fname[0]; |
a = _USE_NTFLAG ? dir[DIR_NTres] : 0; /* NT flag */ |
for (n = 0; n < 8; n++) { /* Convert file name (body) */ |
c = dir[n]; |
if (c == ' ') break; |
if (c == 0x05) c = 0xE5; |
if (a & 0x08 && c >= 'A' && c <= 'Z') c += 0x20; |
*p++ = c; |
} |
if (dir[8] != ' ') { /* Convert file name (extension) */ |
*p++ = '.'; |
for (n = 8; n < 11; n++) { |
c = dir[n]; |
if (c == ' ') break; |
if (a & 0x10 && c >= 'A' && c <= 'Z') c += 0x20; |
*p++ = c; |
} |
} |
*p = '\0'; |
finfo->fattrib = dir[DIR_Attr]; /* Attribute */ |
finfo->fsize = LD_DWORD(&dir[DIR_FileSize]); /* Size */ |
finfo->fdate = LD_WORD(&dir[DIR_WrtDate]); /* Date */ |
finfo->ftime = LD_WORD(&dir[DIR_WrtTime]); /* Time */ |
} |
#endif /* _FS_MINIMIZE <= 1 */ |
/*-----------------------------------------------------------------------*/ |
/* Pick a paragraph and create the name in format of directory entry */ |
/*-----------------------------------------------------------------------*/ |
static |
char make_dirfile ( /* 1: error - detected an invalid format, '\0'or'/': next character */ |
const char **path, /* Pointer to the file path pointer */ |
char *dirname /* Pointer to directory name buffer {Name(8), Ext(3), NT flag(1)} */ |
) |
{ |
BYTE n, t, c, a, b; |
memset(dirname, ' ', 8+3); /* Fill buffer with spaces */ |
a = 0; b = 0x18; /* NT flag */ |
n = 0; t = 8; |
for (;;) { |
c = *(*path)++; |
if (c == '\0' || c == '/') { /* Reached to end of str or directory separator */ |
if (n == 0) break; |
dirname[11] = _USE_NTFLAG ? (a & b) : 0; |
return c; |
} |
if (c <= ' ' || c == 0x7F) break; /* Reject invisible chars */ |
if (c == '.') { |
if (!(a & 1) && n >= 1 && n <= 8) { /* Enter extension part */ |
n = 8; t = 11; continue; |
} |
break; |
} |
if (_USE_SJIS && |
((c >= 0x81 && c <= 0x9F) || /* Accept S-JIS code */ |
(c >= 0xE0 && c <= 0xFC))) { |
if (n == 0 && c == 0xE5) /* Change heading \xE5 to \x05 */ |
c = 0x05; |
a ^= 1; goto md_l2; |
} |
if (c == '"') break; /* Reject " */ |
if (c <= ')') goto md_l1; /* Accept ! # $ % & ' ( ) */ |
if (c <= ',') break; /* Reject * + , */ |
if (c <= '9') goto md_l1; /* Accept - 0-9 */ |
if (c <= '?') break; /* Reject : ; < = > ? */ |
if (!(a & 1)) { /* These checks are not applied to S-JIS 2nd byte */ |
if (c == '|') break; /* Reject | */ |
if (c >= '[' && c <= ']') break;/* Reject [ \ ] */ |
if (_USE_NTFLAG && c >= 'A' && c <= 'Z') |
(t == 8) ? (b &= ~0x08) : (b &= ~0x10); |
if (c >= 'a' && c <= 'z') { /* Convert to upper case */ |
c -= 0x20; |
if (_USE_NTFLAG) (t == 8) ? (a |= 0x08) : (a |= 0x10); |
} |
} |
md_l1: |
a &= ~1; |
md_l2: |
if (n >= t) break; |
dirname[n++] = c; |
} |
return 1; |
} |
/*-----------------------------------------------------------------------*/ |
/* Trace a file path */ |
/*-----------------------------------------------------------------------*/ |
static |
FRESULT trace_path ( /* FR_OK(0): successful, !=0: error code */ |
DIR *dirobj, /* Pointer to directory object to return last directory */ |
char *fn, /* Pointer to last segment name to return */ |
const char *path, /* Full-path string to trace a file or directory */ |
BYTE **dir /* Directory pointer in Win[] to retutn */ |
) |
{ |
CLUST clust; |
char ds; |
BYTE *dptr = NULL; |
FATFS *fs = FatFs; |
/* Initialize directory object */ |
clust = fs->dirbase; |
#if _FAT32 |
if (fs->fs_type == FS_FAT32) { |
dirobj->clust = dirobj->sclust = clust; |
dirobj->sect = clust2sect(clust); |
} else |
#endif |
{ |
dirobj->clust = dirobj->sclust = 0; |
dirobj->sect = clust; |
} |
dirobj->index = 0; |
dirobj->fs = fs; |
if (*path == '\0') { /* Null path means the root directory */ |
*dir = NULL; return FR_OK; |
} |
for (;;) { |
ds = make_dirfile(&path, fn); /* Get a paragraph into fn[] */ |
if (ds == 1) return FR_INVALID_NAME; |
for (;;) { |
if (!move_window(dirobj->sect)) return FR_RW_ERROR; |
dptr = &fs->win[(dirobj->index & 15) * 32]; /* Pointer to the directory entry */ |
if (dptr[DIR_Name] == 0) /* Has it reached to end of dir? */ |
return !ds ? FR_NO_FILE : FR_NO_PATH; |
if (dptr[DIR_Name] != 0xE5 /* Matched? */ |
&& !(dptr[DIR_Attr] & AM_VOL) |
&& !memcmp(&dptr[DIR_Name], fn, 8+3) ) break; |
if (!next_dir_entry(dirobj)) /* Next directory pointer */ |
return !ds ? FR_NO_FILE : FR_NO_PATH; |
} |
if (!ds) { *dir = dptr; return FR_OK; } /* Matched with end of path */ |
if (!(dptr[DIR_Attr] & AM_DIR)) return FR_NO_PATH; /* Cannot trace because it is a file */ |
clust = /* Get cluster# of the directory */ |
#if _FAT32 |
((DWORD)LD_WORD(&dptr[DIR_FstClusHI]) << 16) | |
#endif |
LD_WORD(&dptr[DIR_FstClusLO]); |
dirobj->clust = dirobj->sclust = clust; /* Restart scannig with the new directory */ |
dirobj->sect = clust2sect(clust); |
dirobj->index = 2; |
} |
} |
/*-----------------------------------------------------------------------*/ |
/* Reserve a directory entry */ |
/*-----------------------------------------------------------------------*/ |
#if !_FS_READONLY |
static |
FRESULT reserve_direntry ( /* FR_OK: successful, FR_DENIED: no free entry, FR_RW_ERROR: a disk error occured */ |
DIR *dirobj, /* Target directory to create new entry */ |
BYTE **dir /* Pointer to pointer to created entry to retutn */ |
) |
{ |
CLUST clust; |
DWORD sector; |
BYTE c, n, *dptr; |
FATFS *fs = FatFs; |
/* Re-initialize directory object */ |
clust = dirobj->sclust; |
if (clust) { /* Dyanmic directory table */ |
dirobj->clust = clust; |
dirobj->sect = clust2sect(clust); |
} else { /* Static directory table */ |
dirobj->sect = fs->dirbase; |
} |
dirobj->index = 0; |
do { |
if (!move_window(dirobj->sect)) return FR_RW_ERROR; |
dptr = &fs->win[(dirobj->index & 15) * 32]; /* Pointer to the directory entry */ |
c = dptr[DIR_Name]; |
if (c == 0 || c == 0xE5) { /* Found an empty entry! */ |
*dir = dptr; return FR_OK; |
} |
} while (next_dir_entry(dirobj)); /* Next directory pointer */ |
/* Reached to end of the directory table */ |
/* Abort when static table or could not stretch dynamic table */ |
if (!clust || !(clust = create_chain(dirobj->clust))) return FR_DENIED; |
if (clust == 1 || !move_window(0)) return FR_RW_ERROR; |
fs->winsect = sector = clust2sect(clust); /* Cleanup the expanded table */ |
memset(fs->win, 0, 512); |
for (n = fs->sects_clust; n; n--) { |
if (disk_write(0, fs->win, sector, 1) != RES_OK) |
return FR_RW_ERROR; |
sector++; |
} |
fs->winflag = 1; |
*dir = fs->win; |
return FR_OK; |
} |
#endif /* !_FS_READONLY */ |
/*-----------------------------------------------------------------------*/ |
/* Load boot record and check if it is a FAT boot record */ |
/*-----------------------------------------------------------------------*/ |
static |
BYTE check_fs ( /* 0:The FAT boot record, 1:Valid boot record but not an FAT, 2:Not a boot record or error */ |
DWORD sect /* Sector# to check if it is a FAT boot record or not */ |
) |
{ |
FATFS *fs = FatFs; |
if (disk_read(0, fs->win, sect, 1) != RES_OK) /* Load boot record */ |
return 2; |
if (LD_WORD(&fs->win[BS_55AA]) != 0xAA55) /* Check record signature */ |
return 2; |
if (!memcmp(&fs->win[BS_FilSysType], "FAT", 3)) /* Check FAT signature */ |
return 0; |
#if _FAT32 |
if (!memcmp(&fs->win[BS_FilSysType32], "FAT32", 5) && !(fs->win[BPB_ExtFlags] & 0x80)) |
return 0; |
#endif |
return 1; |
} |
/*-----------------------------------------------------------------------*/ |
/* Make sure that the file system is valid */ |
/*-----------------------------------------------------------------------*/ |
static |
FRESULT auto_mount ( /* FR_OK(0): successful, !=0: any error occured */ |
const char **path, /* Pointer to pointer to the path name (drive number) */ |
BYTE chk_wp /* !=0: Check media write protection for wrinting fuctions */ |
) |
{ |
BYTE fmt; |
DSTATUS stat; |
DWORD bootsect, fatsize, totalsect, maxclust; |
const char *p = *path; |
FATFS *fs = FatFs; |
while (*p == ' ') p++; /* Strip leading spaces */ |
if (*p == '/') p++; /* Strip heading slash */ |
*path = p; /* Return pointer to the path name */ |
/* Is the file system object registered? */ |
if (!fs) return FR_NOT_ENABLED; |
/* Chekck if the logical drive has been mounted or not */ |
if (fs->fs_type) { |
stat = disk_status(0); |
if (!(stat & STA_NOINIT)) { /* If the physical drive is kept initialized */ |
#if !_FS_READONLY |
if (chk_wp && (stat & STA_PROTECT)) /* Check write protection if needed */ |
return FR_WRITE_PROTECTED; |
#endif |
return FR_OK; /* The file system object is valid */ |
} |
} |
/* The logical drive has not been mounted, following code attempts to mount the logical drive */ |
memset(fs, 0, sizeof(FATFS)); /* Clean-up the file system object */ |
stat = disk_initialize(0); /* Initialize low level disk I/O layer */ |
if (stat & STA_NOINIT) /* Check if the drive is ready */ |
return FR_NOT_READY; |
#if !_FS_READONLY |
if (chk_wp && (stat & STA_PROTECT)) /* Check write protection if needed */ |
return FR_WRITE_PROTECTED; |
#endif |
/* Search FAT partition on the drive */ |
fmt = check_fs(bootsect = 0); /* Check sector 0 as an SFD format */ |
if (fmt == 1) { /* Not a FAT boot record, it may be patitioned */ |
/* Check a partition listed in top of the partition table */ |
if (fs->win[MBR_Table+4]) { /* Is the 1st partition existing? */ |
bootsect = LD_DWORD(&fs->win[MBR_Table+8]); /* Partition offset in LBA */ |
fmt = check_fs(bootsect); /* Check the partition */ |
} |
} |
if (fmt || LD_WORD(&fs->win[BPB_BytsPerSec]) != 512) /* No valid FAT patition is found */ |
return FR_NO_FILESYSTEM; |
/* Initialize the file system object */ |
fatsize = LD_WORD(&fs->win[BPB_FATSz16]); /* Number of sectors per FAT */ |
if (!fatsize) fatsize = LD_DWORD(&fs->win[BPB_FATSz32]); |
fs->sects_fat = (CLUST)fatsize; |
fs->n_fats = fs->win[BPB_NumFATs]; /* Number of FAT copies */ |
fatsize *= fs->n_fats; /* (Number of sectors in FAT area) */ |
fs->fatbase = bootsect + LD_WORD(&fs->win[BPB_RsvdSecCnt]); /* FAT start sector (lba) */ |
fs->sects_clust = fs->win[BPB_SecPerClus]; /* Number of sectors per cluster */ |
fs->n_rootdir = LD_WORD(&fs->win[BPB_RootEntCnt]); /* Nmuber of root directory entries */ |
totalsect = LD_WORD(&fs->win[BPB_TotSec16]); /* Number of sectors on the file system */ |
if (!totalsect) totalsect = LD_DWORD(&fs->win[BPB_TotSec32]); |
fs->max_clust = maxclust = (totalsect /* Last cluster# + 1 */ |
- LD_WORD(&fs->win[BPB_RsvdSecCnt]) - fatsize - fs->n_rootdir / 16 |
) / fs->sects_clust + 2; |
fmt = FS_FAT12; /* Determine the FAT sub type */ |
if (maxclust > 0xFF7) fmt = FS_FAT16; |
if (maxclust > 0xFFF7) |
#if !_FAT32 |
return FR_NO_FILESYSTEM; |
#else |
fmt = FS_FAT32; |
if (fmt == FS_FAT32) |
fs->dirbase = LD_DWORD(&fs->win[BPB_RootClus]); /* Root directory start cluster */ |
else |
#endif |
fs->dirbase = fs->fatbase + fatsize; /* Root directory start sector (lba) */ |
fs->database = fs->fatbase + fatsize + fs->n_rootdir / 16; /* Data start sector (lba) */ |
fs->fs_type = fmt; /* FAT sub-type */ |
#if !_FS_READONLY |
fs->free_clust = (CLUST)0xFFFFFFFF; |
#if _USE_FSINFO |
/* Load fsinfo sector if needed */ |
if (fmt == FS_FAT32) { |
fs->fsi_sector = bootsect + LD_WORD(&fs->win[BPB_FSInfo]); |
if (disk_read(0, fs->win, fs->fsi_sector, 1) == RES_OK && |
LD_WORD(&fs->win[BS_55AA]) == 0xAA55 && |
LD_DWORD(&fs->win[FSI_LeadSig]) == 0x41615252 && |
LD_DWORD(&fs->win[FSI_StrucSig]) == 0x61417272) { |
fs->last_clust = LD_DWORD(&fs->win[FSI_Nxt_Free]); |
fs->free_clust = LD_DWORD(&fs->win[FSI_Free_Count]); |
} |
} |
#endif |
#endif |
fs->id = ++fsid; /* File system mount ID */ |
return FR_OK; |
} |
/*-----------------------------------------------------------------------*/ |
/* Check if the file/dir object is valid or not */ |
/*-----------------------------------------------------------------------*/ |
static |
FRESULT validate ( /* FR_OK(0): The id is valid, !=0: Not valid */ |
const FATFS *fs, /* Pointer to the file system object */ |
WORD id /* id member of the target object to be checked */ |
) |
{ |
if (!fs || fs->id != id) |
return FR_INVALID_OBJECT; |
if (disk_status(0) & STA_NOINIT) |
return FR_NOT_READY; |
return FR_OK; |
} |
/*-------------------------------------------------------------------------- |
Public Functions |
--------------------------------------------------------------------------*/ |
/*-----------------------------------------------------------------------*/ |
/* Mount/Unmount a Locical Drive */ |
/*-----------------------------------------------------------------------*/ |
FRESULT f_mount ( |
BYTE drv, /* Logical drive number to be mounted/unmounted */ |
FATFS *fs /* Pointer to new file system object (NULL for unmount)*/ |
) |
{ |
FATFS *fsobj; |
if (drv) return FR_INVALID_DRIVE; |
fsobj = FatFs; |
FatFs = fs; |
if (fsobj) memset(fsobj, 0, sizeof(FATFS)); |
if (fs) memset(fs, 0, sizeof(FATFS)); |
return FR_OK; |
} |
/*-----------------------------------------------------------------------*/ |
/* Open or Create a File */ |
/*-----------------------------------------------------------------------*/ |
FRESULT f_open ( |
FIL *fp, /* Pointer to the blank file object */ |
const char *path, /* Pointer to the file name */ |
BYTE mode /* Access mode and file open mode flags */ |
) |
{ |
FRESULT res; |
BYTE *dir; |
DIR dirobj; |
char fn[8+3+1]; |
FATFS *fs = FatFs; |
fp->fs = NULL; |
#if !_FS_READONLY |
mode &= (FA_READ|FA_WRITE|FA_CREATE_ALWAYS|FA_OPEN_ALWAYS|FA_CREATE_NEW); |
res = auto_mount(&path, (BYTE)(mode & (FA_WRITE|FA_CREATE_ALWAYS|FA_OPEN_ALWAYS|FA_CREATE_NEW))); |
#else |
mode &= FA_READ; |
res = auto_mount(&path, 0); |
#endif |
if (res != FR_OK) return res; |
/* Trace the file path */ |
res = trace_path(&dirobj, fn, path, &dir); /* Trace the file path */ |
#if !_FS_READONLY |
/* Create or Open a File */ |
if (mode & (FA_CREATE_ALWAYS|FA_OPEN_ALWAYS|FA_CREATE_NEW)) { |
CLUST rs; |
DWORD dw; |
if (res != FR_OK) { /* No file, create new */ |
if (res != FR_NO_FILE) return res; |
res = reserve_direntry(&dirobj, &dir); |
if (res != FR_OK) return res; |
memset(dir, 0, 32); /* Initialize the new entry */ |
memcpy(&dir[DIR_Name], fn, 8+3); |
dir[DIR_NTres] = fn[11]; |
mode |= FA_CREATE_ALWAYS; |
} else { /* Any object is already existing */ |
if (mode & FA_CREATE_NEW) /* Cannot create new */ |
return FR_EXIST; |
if (dir == NULL || (dir[DIR_Attr] & (AM_RDO|AM_DIR))) /* Cannot overwrite (R/O or DIR) */ |
return FR_DENIED; |
if (mode & FA_CREATE_ALWAYS) { /* Resize it to zero */ |
#if _FAT32 |
rs = ((DWORD)LD_WORD(&dir[DIR_FstClusHI]) << 16) | LD_WORD(&dir[DIR_FstClusLO]); |
ST_WORD(&dir[DIR_FstClusHI], 0); |
#else |
rs = LD_WORD(&dir[DIR_FstClusLO]); |
#endif |
ST_WORD(&dir[DIR_FstClusLO], 0); /* cluster = 0 */ |
ST_DWORD(&dir[DIR_FileSize], 0); /* size = 0 */ |
fs->winflag = 1; |
dw = fs->winsect; /* Remove the cluster chain */ |
if (!remove_chain(rs) || !move_window(dw)) |
return FR_RW_ERROR; |
fs->last_clust = rs - 1; /* Reuse the cluster hole */ |
} |
} |
if (mode & FA_CREATE_ALWAYS) { |
dir[DIR_Attr] = AM_ARC; /* New attribute */ |
dw = get_fattime(); |
ST_DWORD(&dir[DIR_WrtTime], dw); /* Updated time */ |
ST_DWORD(&dir[DIR_CrtTime], dw); /* Created time */ |
fs->winflag = 1; |
} |
} |
/* Open a File */ |
else { |
#endif /* !_FS_READONLY */ |
if (res != FR_OK) return res; /* Trace failed */ |
if (dir == NULL || (dir[DIR_Attr] & AM_DIR)) /* It is a directory */ |
return FR_NO_FILE; |
#if !_FS_READONLY |
if ((mode & FA_WRITE) && (dir[DIR_Attr] & AM_RDO)) /* R/O violation */ |
return FR_DENIED; |
} |
fp->dir_sect = fs->winsect; /* Pointer to the directory entry */ |
fp->dir_ptr = dir; |
#endif |
fp->flag = mode; /* File access mode */ |
fp->org_clust = /* File start cluster */ |
#if _FAT32 |
((DWORD)LD_WORD(&dir[DIR_FstClusHI]) << 16) | |
#endif |
LD_WORD(&dir[DIR_FstClusLO]); |
fp->fsize = LD_DWORD(&dir[DIR_FileSize]); /* File size */ |
fp->fptr = 0; /* File ptr */ |
fp->sect_clust = 1; /* Sector counter */ |
fp->fs = fs; fp->id = fs->id; /* Owner file system object of the file */ |
return FR_OK; |
} |
/*-----------------------------------------------------------------------*/ |
/* Read File */ |
/*-----------------------------------------------------------------------*/ |
FRESULT f_read ( |
FIL *fp, /* Pointer to the file object */ |
void *buff, /* Pointer to data buffer */ |
WORD btr, /* Number of bytes to read */ |
WORD *br /* Pointer to number of bytes read */ |
) |
{ |
DWORD sect, remain; |
WORD rcnt; |
CLUST clust; |
BYTE cc, *rbuff = buff; |
FRESULT res; |
FATFS *fs = fp->fs; |
*br = 0; |
res = validate(fs, fp->id); /* Check validity of the object */ |
if (res) return res; |
if (fp->flag & FA__ERROR) return FR_RW_ERROR; /* Check error flag */ |
if (!(fp->flag & FA_READ)) return FR_DENIED; /* Check access mode */ |
remain = fp->fsize - fp->fptr; |
if (btr > remain) btr = (WORD)remain; /* Truncate read count by number of bytes left */ |
for ( ; btr; /* Repeat until all data transferred */ |
rbuff += rcnt, fp->fptr += rcnt, *br += rcnt, btr -= rcnt) { |
if ((fp->fptr % 512) == 0) { /* On the sector boundary */ |
if (--fp->sect_clust) { /* Decrement left sector counter */ |
sect = fp->curr_sect + 1; /* Get current sector */ |
} else { /* On the cluster boundary, get next cluster */ |
clust = (fp->fptr == 0) ? |
fp->org_clust : get_cluster(fp->curr_clust); |
if (clust < 2 || clust >= fs->max_clust) |
goto fr_error; |
fp->curr_clust = clust; /* Current cluster */ |
sect = clust2sect(clust); /* Get current sector */ |
fp->sect_clust = fs->sects_clust; /* Re-initialize the left sector counter */ |
} |
fp->curr_sect = sect; /* Update current sector */ |
cc = btr / 512; /* When left bytes >= 512, */ |
if (cc) { /* Read maximum contiguous sectors directly */ |
if (cc > fp->sect_clust) cc = fp->sect_clust; |
if (disk_read(0, rbuff, sect, cc) != RES_OK) |
goto fr_error; |
fp->sect_clust -= cc - 1; |
fp->curr_sect += cc - 1; |
rcnt = cc * 512; continue; |
} |
} |
if (!move_window(fp->curr_sect)) goto fr_error; /* Move sector window */ |
rcnt = 512 - (WORD)(fp->fptr % 512); /* Copy fractional bytes from sector window */ |
if (rcnt > btr) rcnt = btr; |
memcpy(rbuff, &fs->win[(WORD)fp->fptr % 512], rcnt); |
} |
return FR_OK; |
fr_error: /* Abort this function due to an unrecoverable error */ |
fp->flag |= FA__ERROR; |
return FR_RW_ERROR; |
} |
#if !_FS_READONLY |
/*-----------------------------------------------------------------------*/ |
/* Write File */ |
/*-----------------------------------------------------------------------*/ |
FRESULT f_write ( |
FIL *fp, /* Pointer to the file object */ |
const void *buff, /* Pointer to the data to be written */ |
WORD btw, /* Number of bytes to write */ |
WORD *bw /* Pointer to number of bytes written */ |
) |
{ |
DWORD sect; |
WORD wcnt; |
CLUST clust; |
BYTE cc; |
FRESULT res; |
const BYTE *wbuff = buff; |
FATFS *fs = fp->fs; |
*bw = 0; |
res = validate(fs, fp->id); /* Check validity of the object */ |
if (res) return res; |
if (fp->flag & FA__ERROR) return FR_RW_ERROR; /* Check error flag */ |
if (!(fp->flag & FA_WRITE)) return FR_DENIED; /* Check access mode */ |
if (fp->fsize + btw < fp->fsize) return FR_OK; /* File size cannot reach 4GB */ |
for ( ; btw; /* Repeat until all data transferred */ |
wbuff += wcnt, fp->fptr += wcnt, *bw += wcnt, btw -= wcnt) { |
if ((fp->fptr % 512) == 0) { /* On the sector boundary */ |
if (--(fp->sect_clust)) { /* Decrement left sector counter */ |
sect = fp->curr_sect + 1; /* Get current sector */ |
} else { /* On the cluster boundary, get next cluster */ |
if (fp->fptr == 0) { /* Is top of the file */ |
clust = fp->org_clust; |
if (clust == 0) /* No cluster is created yet */ |
fp->org_clust = clust = create_chain(0); /* Create a new cluster chain */ |
} else { /* Middle or end of file */ |
clust = create_chain(fp->curr_clust); /* Trace or streach cluster chain */ |
} |
if (clust == 0) break; /* Disk full */ |
if (clust == 1 || clust >= fs->max_clust) goto fw_error; |
fp->curr_clust = clust; /* Current cluster */ |
sect = clust2sect(clust); /* Get current sector */ |
fp->sect_clust = fs->sects_clust; /* Re-initialize the left sector counter */ |
} |
fp->curr_sect = sect; /* Update current sector */ |
cc = btw / 512; /* When left bytes >= 512, */ |
if (cc) { /* Write maximum contiguous sectors directly */ |
if (cc > fp->sect_clust) cc = fp->sect_clust; |
if (disk_write(0, wbuff, sect, cc) != RES_OK) |
goto fw_error; |
fp->sect_clust -= cc - 1; |
fp->curr_sect += cc - 1; |
wcnt = cc * 512; continue; |
} |
if (fp->fptr >= fp->fsize) { /* Flush R/W window if needed */ |
if (!move_window(0)) goto fw_error; |
fs->winsect = fp->curr_sect; |
} |
} |
if (!move_window(fp->curr_sect)) /* Move sector window */ |
goto fw_error; |
wcnt = 512 - (WORD)(fp->fptr % 512); /* Copy fractional bytes bytes to sector window */ |
if (wcnt > btw) wcnt = btw; |
memcpy(&fs->win[(WORD)fp->fptr % 512], wbuff, wcnt); |
fs->winflag = 1; |
} |
if (fp->fptr > fp->fsize) fp->fsize = fp->fptr; /* Update file size if needed */ |
fp->flag |= FA__WRITTEN; /* Set file changed flag */ |
return FR_OK; |
fw_error: /* Abort this function due to an unrecoverable error */ |
fp->flag |= FA__ERROR; |
return FR_RW_ERROR; |
} |
/*-----------------------------------------------------------------------*/ |
/* Synchronize between File and Disk */ |
/*-----------------------------------------------------------------------*/ |
FRESULT f_sync ( |
FIL *fp /* Pointer to the file object */ |
) |
{ |
DWORD tim; |
BYTE *dir; |
FRESULT res; |
FATFS *fs = fp->fs; |
res = validate(fs, fp->id); /* Check validity of the object */ |
if (res == FR_OK) { |
if (fp->flag & FA__WRITTEN) { /* Has the file been written? */ |
/* Update the directory entry */ |
if (!move_window(fp->dir_sect)) |
return FR_RW_ERROR; |
dir = fp->dir_ptr; |
dir[DIR_Attr] |= AM_ARC; /* Set archive bit */ |
ST_DWORD(&dir[DIR_FileSize], fp->fsize); /* Update file size */ |
ST_WORD(&dir[DIR_FstClusLO], fp->org_clust); /* Update start cluster */ |
#if _FAT32 |
ST_WORD(&dir[DIR_FstClusHI], fp->org_clust >> 16); |
#endif |
tim = get_fattime(); /* Updated time */ |
ST_DWORD(&dir[DIR_WrtTime], tim); |
fp->flag &= ~FA__WRITTEN; |
res = sync(); |
} |
} |
return res; |
} |
#endif /* !_FS_READONLY */ |
/*-----------------------------------------------------------------------*/ |
/* Close File */ |
/*-----------------------------------------------------------------------*/ |
FRESULT f_close ( |
FIL *fp /* Pointer to the file object to be closed */ |
) |
{ |
FRESULT res; |
#if !_FS_READONLY |
res = f_sync(fp); |
#else |
res = validate(fp->fs, fp->id); |
#endif |
if (res == FR_OK) |
fp->fs = NULL; |
return res; |
} |
#if _FS_MINIMIZE <= 2 |
/*-----------------------------------------------------------------------*/ |
/* Seek File Pointer */ |
/*-----------------------------------------------------------------------*/ |
FRESULT f_lseek ( |
FIL *fp, /* Pointer to the file object */ |
DWORD ofs /* File pointer from top of file */ |
) |
{ |
CLUST clust; |
DWORD csize; |
BYTE csect; |
FRESULT res; |
FATFS *fs = fp->fs; |
res = validate(fs, fp->id); /* Check validity of the object */ |
if (res) return res; |
if (fp->flag & FA__ERROR) return FR_RW_ERROR; |
#if !_FS_READONLY |
if (ofs > fp->fsize && !(fp->flag & FA_WRITE)) |
#else |
if (ofs > fp->fsize) |
#endif |
ofs = fp->fsize; |
fp->fptr = 0; fp->sect_clust = 1; /* Set file R/W pointer to top of the file */ |
/* Move file R/W pointer if needed */ |
if (ofs) { |
clust = fp->org_clust; /* Get start cluster */ |
#if !_FS_READONLY |
if (!clust) { /* If the file does not have a cluster chain, create new cluster chain */ |
clust = create_chain(0); |
if (clust == 1) goto fk_error; |
fp->org_clust = clust; |
} |
#endif |
if (clust) { /* If the file has a cluster chain, it can be followed */ |
csize = (DWORD)fs->sects_clust * 512; /* Cluster size in unit of byte */ |
for (;;) { /* Loop to skip leading clusters */ |
fp->curr_clust = clust; /* Update current cluster */ |
if (ofs <= csize) break; |
#if !_FS_READONLY |
if (fp->flag & FA_WRITE) /* Check if in write mode or not */ |
clust = create_chain(clust); /* Force streached if in write mode */ |
else |
#endif |
clust = get_cluster(clust); /* Only follow cluster chain if not in write mode */ |
if (clust == 0) { /* Stop if could not follow the cluster chain */ |
ofs = csize; break; |
} |
if (clust == 1 || clust >= fs->max_clust) goto fk_error; |
fp->fptr += csize; /* Update R/W pointer */ |
ofs -= csize; |
} |
csect = (BYTE)((ofs - 1) / 512); /* Sector offset in the cluster */ |
fp->curr_sect = clust2sect(clust) + csect; /* Current sector */ |
fp->sect_clust = fs->sects_clust - csect; /* Left sector counter in the cluster */ |
fp->fptr += ofs; /* Update file R/W pointer */ |
} |
} |
#if !_FS_READONLY |
if ((fp->flag & FA_WRITE) && fp->fptr > fp->fsize) { /* Set updated flag if in write mode */ |
fp->fsize = fp->fptr; |
fp->flag |= FA__WRITTEN; |
} |
#endif |
return FR_OK; |
fk_error: /* Abort this function due to an unrecoverable error */ |
fp->flag |= FA__ERROR; |
return FR_RW_ERROR; |
} |
#if _FS_MINIMIZE <= 1 |
/*-----------------------------------------------------------------------*/ |
/* Open a directroy */ |
/*-----------------------------------------------------------------------*/ |
FRESULT f_opendir ( |
DIR *dirobj, /* Pointer to directory object to create */ |
const char *path /* Pointer to the directory path */ |
) |
{ |
BYTE *dir; |
char fn[8+3+1]; |
FRESULT res; |
FATFS *fs = FatFs; |
res = auto_mount(&path, 0); |
if (res != FR_OK) return res; |
res = trace_path(dirobj, fn, path, &dir); /* Trace the directory path */ |
if (res == FR_OK) { /* Trace completed */ |
if (dir != NULL) { /* It is not the root dir */ |
if (dir[DIR_Attr] & AM_DIR) { /* The entry is a directory */ |
dirobj->clust = |
#if _FAT32 |
((DWORD)LD_WORD(&dir[DIR_FstClusHI]) << 16) | |
#endif |
LD_WORD(&dir[DIR_FstClusLO]); |
dirobj->sect = clust2sect(dirobj->clust); |
dirobj->index = 2; |
} else { /* The entry is not a directory */ |
res = FR_NO_FILE; |
} |
} |
dirobj->id = fs->id; |
} |
return res; |
} |
/*-----------------------------------------------------------------------*/ |
/* Read Directory Entry in Sequense */ |
/*-----------------------------------------------------------------------*/ |
FRESULT f_readdir ( |
DIR *dirobj, /* Pointer to the directory object */ |
FILINFO *finfo /* Pointer to file information to return */ |
) |
{ |
BYTE *dir, c; |
FRESULT res; |
FATFS *fs = dirobj->fs; |
res = validate(fs, dirobj->id); /* Check validity of the object */ |
if (res) return res; |
finfo->fname[0] = 0; |
while (dirobj->sect) { |
if (!move_window(dirobj->sect)) |
return FR_RW_ERROR; |
dir = &fs->win[(dirobj->index & 15) * 32]; /* pointer to the directory entry */ |
c = dir[DIR_Name]; |
if (c == 0) break; /* Has it reached to end of dir? */ |
if (c != 0xE5 && !(dir[DIR_Attr] & AM_VOL)) /* Is it a valid entry? */ |
get_fileinfo(finfo, dir); |
if (!next_dir_entry(dirobj)) dirobj->sect = 0; /* Next entry */ |
if (finfo->fname[0]) break; /* Found valid entry */ |
} |
return FR_OK; |
} |
#if _FS_MINIMIZE == 0 |
/*-----------------------------------------------------------------------*/ |
/* Get File Status */ |
/*-----------------------------------------------------------------------*/ |
FRESULT f_stat ( |
const char *path, /* Pointer to the file path */ |
FILINFO *finfo /* Pointer to file information to return */ |
) |
{ |
BYTE *dir; |
char fn[8+3+1]; |
FRESULT res; |
DIR dirobj; |
res = auto_mount(&path, 0); |
if (res != FR_OK) return res; |
res = trace_path(&dirobj, fn, path, &dir); /* Trace the file path */ |
if (res == FR_OK) { /* Trace completed */ |
if (dir) /* Found an object */ |
get_fileinfo(finfo, dir); |
else /* It is root dir */ |
res = FR_INVALID_NAME; |
} |
return res; |
} |
#if !_FS_READONLY |
/*-----------------------------------------------------------------------*/ |
/* Get Number of Free Clusters */ |
/*-----------------------------------------------------------------------*/ |
FRESULT f_getfree ( |
const char *drv, /* Logical drive number */ |
DWORD *nclust, /* Pointer to the double word to return number of free clusters */ |
FATFS **fatfs /* Pointer to pointer to the file system object to return */ |
) |
{ |
DWORD n, sect; |
CLUST clust; |
BYTE fat, f, *p; |
FRESULT res; |
FATFS *fs; |
/* Get drive number */ |
res = auto_mount(&drv, 0); |
if (res != FR_OK) return res; |
*fatfs = fs = FatFs; |
/* If number of free cluster is valid, return it without cluster scan. */ |
if (fs->free_clust <= fs->max_clust - 2) { |
*nclust = fs->free_clust; |
return FR_OK; |
} |
/* Count number of free clusters */ |
fat = fs->fs_type; |
n = 0; |
if (fat == FS_FAT12) { |
clust = 2; |
do { |
if ((WORD)get_cluster(clust) == 0) n++; |
} while (++clust < fs->max_clust); |
} else { |
clust = fs->max_clust; |
sect = fs->fatbase; |
f = 0; p = 0; |
do { |
if (!f) { |
if (!move_window(sect++)) return FR_RW_ERROR; |
p = fs->win; |
} |
if (!_FAT32 || fat == FS_FAT16) { |
if (LD_WORD(p) == 0) n++; |
p += 2; f += 1; |
} else { |
if (LD_DWORD(p) == 0) n++; |
p += 4; f += 2; |
} |
} while (--clust); |
} |
fs->free_clust = n; |
#if _USE_FSINFO |
if (fat == FS_FAT32) fs->fsi_flag = 1; |
#endif |
*nclust = n; |
return FR_OK; |
} |
/*-----------------------------------------------------------------------*/ |
/* Delete a File or a Directory */ |
/*-----------------------------------------------------------------------*/ |
FRESULT f_unlink ( |
const char *path /* Pointer to the file or directory path */ |
) |
{ |
BYTE *dir, *sdir; |
DWORD dsect; |
char fn[8+3+1]; |
CLUST dclust; |
FRESULT res; |
DIR dirobj; |
FATFS *fs = FatFs; |
res = auto_mount(&path, 1); |
if (res != FR_OK) return res; |
res = trace_path(&dirobj, fn, path, &dir); /* Trace the file path */ |
if (res != FR_OK) return res; /* Trace failed */ |
if (dir == NULL) return FR_INVALID_NAME; /* It is the root directory */ |
if (dir[DIR_Attr] & AM_RDO) return FR_DENIED; /* It is a R/O object */ |
dsect = fs->winsect; |
dclust = |
#if _FAT32 |
((DWORD)LD_WORD(&dir[DIR_FstClusHI]) << 16) | |
#endif |
LD_WORD(&dir[DIR_FstClusLO]); |
if (dir[DIR_Attr] & AM_DIR) { /* It is a sub-directory */ |
dirobj.clust = dclust; /* Check if the sub-dir is empty or not */ |
dirobj.sect = clust2sect(dclust); |
dirobj.index = 2; |
do { |
if (!move_window(dirobj.sect)) return FR_RW_ERROR; |
sdir = &fs->win[(dirobj.index & 15) * 32]; |
if (sdir[DIR_Name] == 0) break; |
if (sdir[DIR_Name] != 0xE5 && !(sdir[DIR_Attr] & AM_VOL)) |
return FR_DENIED; /* The directory is not empty */ |
} while (next_dir_entry(&dirobj)); |
} |
if (!move_window(dsect)) return FR_RW_ERROR; /* Mark the directory entry 'deleted' */ |
dir[DIR_Name] = 0xE5; |
fs->winflag = 1; |
if (!remove_chain(dclust)) return FR_RW_ERROR; /* Remove the cluster chain */ |
return sync(); |
} |
/*-----------------------------------------------------------------------*/ |
/* Create a Directory */ |
/*-----------------------------------------------------------------------*/ |
FRESULT f_mkdir ( |
const char *path /* Pointer to the directory path */ |
) |
{ |
BYTE *dir, *fw, n; |
char fn[8+3+1]; |
DWORD sect, dsect, tim; |
CLUST dclust, pclust; |
FRESULT res; |
DIR dirobj; |
FATFS *fs = FatFs; |
res = auto_mount(&path, 1); |
if (res != FR_OK) return res; |
res = trace_path(&dirobj, fn, path, &dir); /* Trace the file path */ |
if (res == FR_OK) return FR_EXIST; /* Any file or directory is already existing */ |
if (res != FR_NO_FILE) return res; |
res = reserve_direntry(&dirobj, &dir); /* Reserve a directory entry */ |
if (res != FR_OK) return res; |
sect = fs->winsect; |
dclust = create_chain(0); /* Allocate a cluster for new directory table */ |
if (dclust == 1) return FR_RW_ERROR; |
dsect = clust2sect(dclust); |
if (!dsect) return FR_DENIED; |
if (!move_window(dsect)) return FR_RW_ERROR; |
fw = fs->win; |
memset(fw, 0, 512); /* Clear the directory table */ |
for (n = 1; n < fs->sects_clust; n++) { |
if (disk_write(0, fw, ++dsect, 1) != RES_OK) |
return FR_RW_ERROR; |
} |
memset(&fw[DIR_Name], ' ', 8+3); /* Create "." entry */ |
fw[DIR_Name] = '.'; |
fw[DIR_Attr] = AM_DIR; |
tim = get_fattime(); |
ST_DWORD(&fw[DIR_WrtTime], tim); |
memcpy(&fw[32], &fw[0], 32); fw[33] = '.'; /* Create ".." entry */ |
pclust = dirobj.sclust; |
#if _FAT32 |
ST_WORD(&fw[ DIR_FstClusHI], dclust >> 16); |
if (fs->fs_type == FS_FAT32 && pclust == fs->dirbase) pclust = 0; |
ST_WORD(&fw[32+DIR_FstClusHI], pclust >> 16); |
#endif |
ST_WORD(&fw[ DIR_FstClusLO], dclust); |
ST_WORD(&fw[32+DIR_FstClusLO], pclust); |
fs->winflag = 1; |
if (!move_window(sect)) return FR_RW_ERROR; |
memset(&dir[0], 0, 32); /* Clean-up the new entry */ |
memcpy(&dir[DIR_Name], fn, 8+3); /* Name */ |
dir[DIR_NTres] = fn[11]; |
dir[DIR_Attr] = AM_DIR; /* Attribute */ |
ST_DWORD(&dir[DIR_WrtTime], tim); /* Crated time */ |
ST_WORD(&dir[DIR_FstClusLO], dclust); /* Table start cluster */ |
#if _FAT32 |
ST_WORD(&dir[DIR_FstClusHI], dclust >> 16); |
#endif |
return sync(); |
} |
/*-----------------------------------------------------------------------*/ |
/* Change File Attribute */ |
/*-----------------------------------------------------------------------*/ |
FRESULT f_chmod ( |
const char *path, /* Pointer to the file path */ |
BYTE value, /* Attribute bits */ |
BYTE mask /* Attribute mask to change */ |
) |
{ |
FRESULT res; |
BYTE *dir; |
DIR dirobj; |
char fn[8+3+1]; |
res = auto_mount(&path, 1); |
if (res == FR_OK) { |
res = trace_path(&dirobj, fn, path, &dir); /* Trace the file path */ |
if (res == FR_OK) { /* Trace completed */ |
if (dir == NULL) { |
res = FR_INVALID_NAME; |
} else { |
mask &= AM_RDO|AM_HID|AM_SYS|AM_ARC; /* Valid attribute mask */ |
dir[DIR_Attr] = (value & mask) | (dir[DIR_Attr] & (BYTE)~mask); /* Apply attribute change */ |
res = sync(); |
} |
} |
} |
return res; |
} |
/*-----------------------------------------------------------------------*/ |
/* Rename File/Directory */ |
/*-----------------------------------------------------------------------*/ |
FRESULT f_rename ( |
const char *path_old, /* Pointer to the old name */ |
const char *path_new /* Pointer to the new name */ |
) |
{ |
FRESULT res; |
DWORD sect_old; |
BYTE *dir_old, *dir_new, direntry[32-11]; |
DIR dirobj; |
char fn[8+3+1]; |
FATFS *fs = FatFs; |
res = auto_mount(&path_old, 1); |
if (res != FR_OK) return res; |
res = trace_path(&dirobj, fn, path_old, &dir_old); /* Check old object */ |
if (res != FR_OK) return res; /* The old object is not found */ |
if (!dir_old) return FR_NO_FILE; |
sect_old = fs->winsect; /* Save the object information */ |
memcpy(direntry, &dir_old[11], 32-11); |
res = trace_path(&dirobj, fn, path_new, &dir_new); /* Check new object */ |
if (res == FR_OK) return FR_EXIST; /* The new object name is already existing */ |
if (res != FR_NO_FILE) return res; /* Is there no old name? */ |
res = reserve_direntry(&dirobj, &dir_new); /* Reserve a directory entry */ |
if (res != FR_OK) return res; |
memcpy(&dir_new[DIR_Attr], direntry, 32-11); /* Create new entry */ |
memcpy(&dir_new[DIR_Name], fn, 8+3); |
dir_new[DIR_NTres] = fn[11]; |
fs->winflag = 1; |
if (!move_window(sect_old)) return FR_RW_ERROR; /* Remove old entry */ |
dir_old[DIR_Name] = 0xE5; |
return sync(); |
} |
#endif /* !_FS_READONLY */ |
#endif /* _FS_MINIMIZE == 0 */ |
#endif /* _FS_MINIMIZE <= 1 */ |
#endif /* _FS_MINIMIZE <= 2 */ |
/Designs/Data_loggers/DOGFINDER01A/SW/ATMEGA168/tff.h |
---|
0,0 → 1,289 |
/*--------------------------------------------------------------------------/ |
/ Tiny-FatFs - FAT file system module include file R0.04b (C)ChaN, 2007 |
/---------------------------------------------------------------------------/ |
/ FatFs module is an experimenal project to implement FAT file system to |
/ cheap microcontrollers. This is a free software and is opened for education, |
/ research and development under license policy of following trems. |
/ |
/ Copyright (C) 2007, ChaN, all right reserved. |
/ |
/ * The FatFs module is a free software and there is no warranty. |
/ * You can use, modify and/or redistribute it for personal, non-profit or |
/ profit use without any restriction under your responsibility. |
/ * Redistributions of source code must retain the above copyright notice. |
/ |
/---------------------------------------------------------------------------*/ |
#ifndef _FATFS |
#define _MCU_ENDIAN 1 |
/* The _MCU_ENDIAN defines which access method is used to the FAT structure. |
/ 1: Enable word access. |
/ 2: Disable word access and use byte-by-byte access instead. |
/ When the architectural byte order of the MCU is big-endian and/or address |
/ miss-aligned access is prohibited, the _MCU_ENDIAN must be set to 2. |
/ If it is not the case, it can be set to 1 for good code efficiency. */ |
#define _FS_READONLY 0 |
/* Setting _FS_READONLY to 1 defines read only configuration. This removes |
/ writing functions, f_write, f_sync, f_unlink, f_mkdir, f_chmod, f_rename |
/ and useless f_getfree. */ |
#define _FS_MINIMIZE 2 |
/* The _FS_MINIMIZE option defines minimization level to remove some functions. |
/ 0: Full function. |
/ 1: f_stat, f_getfree, f_unlink, f_mkdir, f_chmod and f_rename are removed. |
/ 2: f_opendir and f_readdir are removed in addition to level 1. |
/ 3: f_lseek is removed in addition to level 2. */ |
#define _FAT32 0 |
/* To support FAT32 in addition of FAT12/16, set _FAT32 to 1. */ |
#define _USE_FSINFO 0 |
/* To support FSInfo on FAT32 volume, set _USE_FSINFO to 1. */ |
#define _USE_SJIS 0 |
/* When _USE_SJIS is set to 1, Shift-JIS code transparency is enabled, otherwise |
/ only US-ASCII(7bit) code can be accepted as file/directory name. */ |
#define _USE_NTFLAG 1 |
/* When _USE_NTFLAG is set to 1, upper/lower case of the file name is preserved. */ |
#include "integer.h" |
/* Type definition for cluster number */ |
#if _FAT32 |
typedef DWORD CLUST; |
#else |
typedef WORD CLUST; |
#undef _USE_FSINFO |
#define _USE_FSINFO 0 |
#endif |
/* File system object structure */ |
typedef struct _FATFS { |
WORD id; /* File system mount ID */ |
WORD n_rootdir; /* Number of root directory entries */ |
DWORD winsect; /* Current sector appearing in the win[] */ |
DWORD fatbase; /* FAT start sector */ |
DWORD dirbase; /* Root directory start sector */ |
DWORD database; /* Data start sector */ |
CLUST sects_fat; /* Sectors per fat */ |
CLUST max_clust; /* Maximum cluster# + 1 */ |
#if !_FS_READONLY |
CLUST last_clust; /* Last allocated cluster */ |
CLUST free_clust; /* Number of free clusters */ |
#if _USE_FSINFO |
DWORD fsi_sector; /* fsinfo sector */ |
BYTE fsi_flag; /* fsinfo dirty flag (1:must be written back) */ |
BYTE pad1; |
#endif |
#endif |
BYTE fs_type; /* FAT sub type */ |
BYTE sects_clust; /* Sectors per cluster */ |
BYTE n_fats; /* Number of FAT copies */ |
BYTE winflag; /* win[] dirty flag (1:must be written back) */ |
BYTE win[512]; /* Disk access window for Directory/FAT/File */ |
} FATFS; |
/* Directory object structure */ |
typedef struct _DIR { |
WORD id; /* Owner file system mount ID */ |
WORD index; /* Current index */ |
FATFS* fs; /* Pointer to the owner file system object */ |
CLUST sclust; /* Start cluster */ |
CLUST clust; /* Current cluster */ |
DWORD sect; /* Current sector */ |
} DIR; |
/* File object structure */ |
typedef struct _FIL { |
WORD id; /* Owner file system mount ID */ |
BYTE flag; /* File status flags */ |
BYTE sect_clust; /* Left sectors in cluster */ |
FATFS* fs; /* Pointer to owner file system */ |
DWORD fptr; /* File R/W pointer */ |
DWORD fsize; /* File size */ |
CLUST org_clust; /* File start cluster */ |
CLUST curr_clust; /* Current cluster */ |
DWORD curr_sect; /* Current sector */ |
#if !_FS_READONLY |
DWORD dir_sect; /* Sector containing the directory entry */ |
BYTE* dir_ptr; /* Ponter to the directory entry in the window */ |
#endif |
} FIL; |
/* File status structure */ |
typedef struct _FILINFO { |
DWORD fsize; /* Size */ |
WORD fdate; /* Date */ |
WORD ftime; /* Time */ |
BYTE fattrib; /* Attribute */ |
char fname[8+1+3+1]; /* Name (8.3 format) */ |
} FILINFO; |
/* File function return code (FRESULT) */ |
typedef enum { |
FR_OK = 0, /* 0 */ |
FR_NOT_READY, /* 1 */ |
FR_NO_FILE, /* 2 */ |
FR_NO_PATH, /* 3 */ |
FR_INVALID_NAME, /* 4 */ |
FR_INVALID_DRIVE, /* 5 */ |
FR_DENIED, /* 6 */ |
FR_EXIST, /* 7 */ |
FR_RW_ERROR, /* 8 */ |
FR_WRITE_PROTECTED, /* 9 */ |
FR_NOT_ENABLED, /* 10 */ |
FR_NO_FILESYSTEM, /* 11 */ |
FR_INVALID_OBJECT /* 12 */ |
} FRESULT; |
/*-----------------------------------------------------*/ |
/* FatFs module application interface */ |
FRESULT f_mount (BYTE, FATFS*); /* Mount/Unmount a logical drive */ |
FRESULT f_open (FIL*, const char*, BYTE); /* Open or create a file */ |
FRESULT f_read (FIL*, void*, WORD, WORD*); /* Read data from a file */ |
FRESULT f_write (FIL*, const void*, WORD, WORD*); /* Write data to a file */ |
FRESULT f_lseek (FIL*, DWORD); /* Move file pointer of a file object */ |
FRESULT f_close (FIL*); /* Close an open file object */ |
FRESULT f_opendir (DIR*, const char*); /* Open an existing directory */ |
FRESULT f_readdir (DIR*, FILINFO*); /* Read a directory item */ |
FRESULT f_stat (const char*, FILINFO*); /* Get file status */ |
FRESULT f_getfree (const char*, DWORD*, FATFS**); /* Get number of free clusters on the drive */ |
FRESULT f_sync (FIL*); /* Flush cached data of a writing file */ |
FRESULT f_unlink (const char*); /* Delete an existing file or directory */ |
FRESULT f_mkdir (const char*); /* Create a new directory */ |
FRESULT f_chmod (const char*, BYTE, BYTE); /* Change file/dir attriburte */ |
FRESULT f_rename (const char*, const char*); /* Rename/Move a file or directory */ |
/* User defined function to give a current time to fatfs module */ |
DWORD get_fattime (void); /* 31-25: Year(0-127 +1980), 24-21: Month(1-12), 20-16: Day(1-31) */ |
/* 15-11: Hour(0-23), 10-5: Minute(0-59), 4-0: Second(0-29 *2) */ |
/* File access control and file status flags (FIL.flag) */ |
#define FA_READ 0x01 |
#define FA_OPEN_EXISTING 0x00 |
#if !_FS_READONLY |
#define FA_WRITE 0x02 |
#define FA_CREATE_NEW 0x04 |
#define FA_CREATE_ALWAYS 0x08 |
#define FA_OPEN_ALWAYS 0x10 |
#define FA__WRITTEN 0x20 |
#endif |
#define FA__ERROR 0x80 |
/* FAT sub type (FATFS.fs_type) */ |
#define FS_FAT12 1 |
#define FS_FAT16 2 |
#define FS_FAT32 3 |
/* File attribute bits for directory entry */ |
#define AM_RDO 0x01 /* Read only */ |
#define AM_HID 0x02 /* Hidden */ |
#define AM_SYS 0x04 /* System */ |
#define AM_VOL 0x08 /* Volume label */ |
#define AM_LFN 0x0F /* LFN entry */ |
#define AM_DIR 0x10 /* Directory */ |
#define AM_ARC 0x20 /* Archive */ |
/* Offset of FAT structure members */ |
#define BS_jmpBoot 0 |
#define BS_OEMName 3 |
#define BPB_BytsPerSec 11 |
#define BPB_SecPerClus 13 |
#define BPB_RsvdSecCnt 14 |
#define BPB_NumFATs 16 |
#define BPB_RootEntCnt 17 |
#define BPB_TotSec16 19 |
#define BPB_Media 21 |
#define BPB_FATSz16 22 |
#define BPB_SecPerTrk 24 |
#define BPB_NumHeads 26 |
#define BPB_HiddSec 28 |
#define BPB_TotSec32 32 |
#define BS_55AA 510 |
#define BS_DrvNum 36 |
#define BS_BootSig 38 |
#define BS_VolID 39 |
#define BS_VolLab 43 |
#define BS_FilSysType 54 |
#define BPB_FATSz32 36 |
#define BPB_ExtFlags 40 |
#define BPB_FSVer 42 |
#define BPB_RootClus 44 |
#define BPB_FSInfo 48 |
#define BPB_BkBootSec 50 |
#define BS_DrvNum32 64 |
#define BS_BootSig32 66 |
#define BS_VolID32 67 |
#define BS_VolLab32 71 |
#define BS_FilSysType32 82 |
#define FSI_LeadSig 0 |
#define FSI_StrucSig 484 |
#define FSI_Free_Count 488 |
#define FSI_Nxt_Free 492 |
#define MBR_Table 446 |
#define DIR_Name 0 |
#define DIR_Attr 11 |
#define DIR_NTres 12 |
#define DIR_CrtTime 14 |
#define DIR_CrtDate 16 |
#define DIR_FstClusHI 20 |
#define DIR_WrtTime 22 |
#define DIR_WrtDate 24 |
#define DIR_FstClusLO 26 |
#define DIR_FileSize 28 |
/* Multi-byte word access macros */ |
#if _MCU_ENDIAN == 1 /* Use word access */ |
#define LD_WORD(ptr) (WORD)(*(WORD*)(BYTE*)(ptr)) |
#define LD_DWORD(ptr) (DWORD)(*(DWORD*)(BYTE*)(ptr)) |
#define ST_WORD(ptr,val) *(WORD*)(BYTE*)(ptr)=(WORD)(val) |
#define ST_DWORD(ptr,val) *(DWORD*)(BYTE*)(ptr)=(DWORD)(val) |
#else |
#if _MCU_ENDIAN == 2 /* Use byte-by-byte access */ |
#define LD_WORD(ptr) (WORD)(((WORD)*(BYTE*)((ptr)+1)<<8)|(WORD)*(BYTE*)(ptr)) |
#define LD_DWORD(ptr) (DWORD)(((DWORD)*(BYTE*)((ptr)+3)<<24)|((DWORD)*(BYTE*)((ptr)+2)<<16)|((WORD)*(BYTE*)((ptr)+1)<<8)|*(BYTE*)(ptr)) |
#define ST_WORD(ptr,val) *(BYTE*)(ptr)=(BYTE)(val); *(BYTE*)((ptr)+1)=(BYTE)((WORD)(val)>>8) |
#define ST_DWORD(ptr,val) *(BYTE*)(ptr)=(BYTE)(val); *(BYTE*)((ptr)+1)=(BYTE)((WORD)(val)>>8); *(BYTE*)((ptr)+2)=(BYTE)((DWORD)(val)>>16); *(BYTE*)((ptr)+3)=(BYTE)((DWORD)(val)>>24) |
#else |
#error Do not forget to set _MCU_ENDIAN properly! |
#endif |
#endif |
#define _FATFS |
#endif /* _FATFS */ |
/Designs/Data_loggers/DOGFINDER01A/SW/ATMEGA168/tt.ini |
---|
0,0 → 1,0 |
bps=115200 |
/Designs/Data_loggers/DOGFINDER02A/PrjInfo.txt |
---|
0,0 → 1,17 |
// |
// Toto je popisný soubor pro popis obsahu adresáře (příklad) |
// |
[InfoShortDescription.en] |
Dog finder - Beacon tracker |
[InfoShortDescription.cs] |
Psí vyhledávač - majákový vysílač |
[InfoLongDescription.en] |
The coordinate of GPS receiver is transmitted by the RFM01S module to receiver station. |
[InfoLongDescription.cs] |
Zařízení vysílá pozici GPS přijímače na psím obojku. |
[End] |
/Designs/Data_loggers/DOGFINDER02A/PrjInfo.txt~ |
---|
0,0 → 1,18 |
// |
// Toto je popisný soubor pro popis obsahu adresáře (příklad) |
// |
[InfoShortDescription.en] |
Dog finder - Track Logger |
[InfoShortDescription.cs] |
Psí vyhledávač - záznamník trasy |
[InfoLongDescription.en] |
The track is logged in NMEA format on SD/MMC card. |
[InfoLongDescription.cs] |
Umožňuje zaznamanat trasu opakovaně utíkajícího psa. A tím nalézt zdroj problémů, například díru v plotě :) |
Trasa je zaznamenávána na SD/MMC kartu ve formátu NMEA. |
[End] |
/Designs/Data_loggers/DOGFINDER02A/SW/DOGFINDER_TX.c |
---|
0,0 → 1,192 |
/* mija 2008 |
demo for RFM02 - TX 868MHz |
CPU ATMEGA16 |
fcpu = 1MHz |
!! define PIN,PORT,DDR for IOpin !! |
tested with module RFM12B RX 9600 BW 134kHz |
*/ |
#define F_CPU 1000000UL |
#include <avr/io.h> |
#include <util/delay.h> |
#include "RFM02.h" |
//************************************************************************ |
#define SDI PB3 |
#define SDI_PORT PORTB |
#define SDI_DDR DDRB |
#define FSK PC1 |
#define FSK_PORT PORTC |
#define FSK_DDR DDRC |
+#define SCK PB5 |
+ #define SCK_PORT PORTB |
+ #define SCK_DDR DDRB |
+ |
+#define nIRQ PD2 // input for mega |
+ #define nIRQ_PORT PORTD |
+ #define nIRQ_DDR DDRD |
+ #define nIRQ_PIN PIND |
+ |
+#define nSEL PB2 |
+ #define nSEL_PORT PORTB |
+ #define nSEL_DDR DDRB |
+ |
+#define LED PC3 |
+ #define LED_PORT PORTC |
+ #define LED_DDR DDRC |
+ |
+// interni |
+#define SDI_H SDI_PORT |= _BV(SDI) |
+#define SDI_L SDI_PORT &= (~(_BV(SDI))) |
+#define SDI_INIT SDI_DDR |= _BV(SDI) |
+ |
+#define FSK_H FSK_PORT |= _BV(FSK) |
+#define FSK_L FSK_PORT &= (~(_BV(FSK))) |
+#define FSK_INIT FSK_DDR |= _BV(FSK) |
+ |
+#define SDO_INPUT (SDO_PIN & _BV(SDO)) |
+#define SDO_INIT SDO_DDR &= (~(_BV(SDO))) |
+ |
+#define SCK_H SCK_PORT |= _BV(SCK) |
+#define SCK_L SCK_PORT &= (~(_BV(SCK))) |
+#define SCK_INIT SCK_DDR |= _BV(SCK) |
+ |
+#define nIRQ_INPUT (nIRQ_PIN & _BV(nIRQ)) |
+#define nIRQ_INIT nIRQ_DDR &= (~(_BV(nIRQ))) |
+ |
+#define nSEL_H nSEL_PORT |= _BV(nSEL) |
+#define nSEL_L nSEL_PORT &= (~(_BV(nSEL))) |
+#define nSEL_INIT nSEL_DDR |= _BV(nSEL) |
+ |
+#define LED_H LED_PORT |= _BV(LED) |
+#define LED_L LED_PORT &= (~(_BV(LED))) |
+#define LED_INIT LED_DDR |= _BV(LED) |
+ |
+#define START_TX RF_WRITE_CMD(CMD_POWER|POWER_EX|POWER_ES|POWER_EA|POWER_DC) |
+#define STOP_TX RF_WRITE_CMD(CMD_POWER|POWER_DC) |
+ |
+//************************************************************************ |
+ |
+//uint8_t test[16]={0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3a,0x03b,0x3c,0x3d,0x3e,0x3f}; |
+uint8_t test[17]="\n\rATmega16\n\r ---"; |
+//uint8_t test[16]="0123456789abcdef"; |
+ |
+ |
+//************************************************************************ |
+ |
+void delay_ms(uint16_t time) |
+{ |
+ while(time--) _delay_ms(1); |
+} |
+ |
+void IO_INIT(void) |
+{ |
+ SDI_INIT; |
+ SCK_INIT; |
+ nIRQ_INIT; |
+ nSEL_INIT; |
+ FSK_INIT; |
+ LED_INIT; |
+} |
+ |
+void RF_INIT(void) |
+{ |
+ nSEL_H; |
+ SDI_H; |
+ SCK_L; |
+ nIRQ_INPUT; |
+ FSK_H; |
+} |
+ |
+void RF_WRITE_CMD(uint16_t cmd) |
+{ |
+ uint8_t i; |
+ |
+ SCK_L; |
+ nSEL_L; |
+ for (i=0;i<16;i++) |
+ { |
+ SCK_L; |
+ SCK_L; |
+ if (cmd & 0x8000) SDI_H; |
+ else SDI_L; |
+ SCK_H; |
+ SCK_H; |
+ cmd <<= 1; |
+ } |
+ SCK_L; |
+ nSEL_H; |
+} |
+ |
+void RF_WRITE_DATA(uint8_t data) |
+{ |
+ uint8_t i; |
+ |
+ for (i=0;i<8;i++) |
+ { |
+ while (nIRQ_INPUT); |
+ while (!nIRQ_INPUT); |
+ if (data & 0x80)FSK_H; |
+ else FSK_L; |
+ data <<= 1; |
+ } |
+} |
+ |
+int main() |
+{ |
+ uint8_t i,j,ChkSum; |
+ |
+ IO_INIT(); |
+ RF_INIT(); |
+ LED_H; |
+ delay_ms(100); |
+ |
+ RF_WRITE_CMD(CMD_STATUS); |
+ RF_WRITE_CMD(CMD_SETTING |BAND_868 |C_12pF |TX_DEV_90); |
+ RF_WRITE_CMD(CMD_FREQUENCY |FREQUENCY_868); |
+ RF_WRITE_CMD(0xD040); |
+ RF_WRITE_CMD(CMD_RATE |RATE_4800); |
+ RF_WRITE_CMD(CMD_BATTERY |TX_EBS); |
+ RF_WRITE_CMD(CMD_POWER |POWER_DC); |
+ RF_WRITE_CMD(POWER_OUT_0); |
+ |
+ j= 0; |
+ while (1) |
+ { |
+ LED_H; |
+ |
+ START_TX; |
+ ChkSum = 0; |
+ for (i=0;i<3;i++) RF_WRITE_DATA(0xAA); |
+ RF_WRITE_DATA(0x2D); |
+ RF_WRITE_DATA(0xD4); |
+ |
+ for (i=0;i<16;i++) |
+ { |
+ RF_WRITE_DATA(test[i]); |
+ ChkSum += test[i]; |
+ } |
+ RF_WRITE_DATA(ChkSum); |
+ RF_WRITE_DATA(0xAA); |
+ RF_WRITE_DATA(0xAA); |
+ STOP_TX; |
+ |
+ LED_L; |
+ delay_ms(500); |
+ j++; |
+ test[13]=(j/100)+0x30; |
+ test[14]=((j%100)/10)+0x30; |
+ test[15]=((j%100)%10)+0x30; |
+ } |
+ return 0; |
+} |
+ |
+ |
+ |
/Designs/Data_loggers/DOGFINDER02A/SW/DOGFINDER_TX.c~ |
---|
0,0 → 1,192 |
/* mija 2008 |
demo for RFM02 - TX 868MHz |
CPU ATMEGA16 |
fcpu = 1MHz |
!! define PIN,PORT,DDR for IOpin !! |
tested with module RFM12B RX 9600 BW 134kHz |
*/ |
#define F_CPU 1000000UL |
#include <avr/io.h> |
#include <util/delay.h> |
#include "RFM02.h" |
//************************************************************************ |
#define SDI PB3 |
#define SDI_PORT PORTB |
#define SDI_DDR DDRB |
#define FSK PC1 |
#define FSK_PORT PORTC |
#define FSK_DDR DDRC |
+#define SCK PB5 |
+ #define SCK_PORT PORTB |
+ #define SCK_DDR DDRB |
+ |
+#define nIRQ PD2 // input for mega |
+ #define nIRQ_PORT PORTD |
+ #define nIRQ_DDR DDRD |
+ #define nIRQ_PIN PIND |
+ |
+#define nSEL PB2 |
+ #define nSEL_PORT PORTB |
+ #define nSEL_DDR DDRB |
+ |
+#define LED PC3 |
+ #define LED_PORT PORTC |
+ #define LED_DDR DDRC |
+ |
+// interni |
+#define SDI_H SDI_PORT |= _BV(SDI) |
+#define SDI_L SDI_PORT &= (~(_BV(SDI))) |
+#define SDI_INIT SDI_DDR |= _BV(SDI) |
+ |
+#define FSK_H FSK_PORT |= _BV(FSK) |
+#define FSK_L FSK_PORT &= (~(_BV(FSK))) |
+#define FSK_INIT FSK_DDR |= _BV(FSK) |
+ |
+#define SDO_INPUT (SDO_PIN & _BV(SDO)) |
+#define SDO_INIT SDO_DDR &= (~(_BV(SDO))) |
+ |
+#define SCK_H SCK_PORT |= _BV(SCK) |
+#define SCK_L SCK_PORT &= (~(_BV(SCK))) |
+#define SCK_INIT SCK_DDR |= _BV(SCK) |
+ |
+#define nIRQ_INPUT (nIRQ_PIN & _BV(nIRQ)) |
+#define nIRQ_INIT nIRQ_DDR &= (~(_BV(nIRQ))) |
+ |
+#define nSEL_H nSEL_PORT |= _BV(nSEL) |
+#define nSEL_L nSEL_PORT &= (~(_BV(nSEL))) |
+#define nSEL_INIT nSEL_DDR |= _BV(nSEL) |
+ |
+#define LED_H LED_PORT |= _BV(LED) |
+#define LED_L LED_PORT &= (~(_BV(LED))) |
+#define LED_INIT LED_DDR |= _BV(LED) |
+ |
+#define START_TX RF_WRITE_CMD(CMD_POWER|POWER_EX|POWER_ES|POWER_EA|POWER_DC) |
+#define STOP_TX RF_WRITE_CMD(CMD_POWER|POWER_DC) |
+ |
+//************************************************************************ |
+ |
+//uint8_t test[16]={0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3a,0x03b,0x3c,0x3d,0x3e,0x3f}; |
+uint8_t test[17]="\n\rATmega16\n\r ---"; |
+//uint8_t test[16]="0123456789abcdef"; |
+ |
+ |
+//************************************************************************ |
+ |
+void delay_ms(uint16_t time) |
+{ |
+ while(time--) _delay_ms(1); |
+} |
+ |
+void IO_INIT(void) |
+{ |
+ SDI_INIT; |
+ SCK_INIT; |
+ nIRQ_INIT; |
+ nSEL_INIT; |
+ FSK_INIT; |
+ LED_INIT; |
+} |
+ |
+void RF_INIT(void) |
+{ |
+ nSEL_H; |
+ SDI_H; |
+ SCK_L; |
+ nIRQ_INPUT; |
+ FSK_H; |
+} |
+ |
+void RF_WRITE_CMD(uint16_t cmd) |
+{ |
+ uint8_t i; |
+ |
+ SCK_L; |
+ nSEL_L; |
+ for (i=0;i<16;i++) |
+ { |
+ SCK_L; |
+ SCK_L; |
+ if (cmd & 0x8000) SDI_H; |
+ else SDI_L; |
+ SCK_H; |
+ SCK_H; |
+ cmd <<= 1; |
+ } |
+ SCK_L; |
+ nSEL_H; |
+} |
+ |
+void RF_WRITE_DATA(uint8_t data) |
+{ |
+ uint8_t i; |
+ |
+ for (i=0;i<8;i++) |
+ { |
+ while (nIRQ_INPUT); |
+ while (!nIRQ_INPUT); |
+ if (data & 0x80)FSK_H; |
+ else FSK_L; |
+ data <<= 1; |
+ } |
+} |
+ |
+int main() |
+{ |
+ uint8_t i,j,ChkSum; |
+ |
+ IO_INIT(); |
+ RF_INIT(); |
+ LED_H; |
+ delay_ms(100); |
+ |
+ RF_WRITE_CMD(CMD_STATUS); |
+ RF_WRITE_CMD(CMD_SETTING |BAND_868 |C_12pF |TX_DEV_90); |
+ RF_WRITE_CMD(CMD_FREQUENCY |FREQUENCY_868); |
+ RF_WRITE_CMD(0xD040); |
+ RF_WRITE_CMD(CMD_RATE |RATE_9600); |
+ RF_WRITE_CMD(CMD_BATTERY |TX_EBS); |
+ RF_WRITE_CMD(CMD_POWER |POWER_DC); |
+ RF_WRITE_CMD(POWER_OUT_0); |
+ |
+ j= 0; |
+ while (1) |
+ { |
+ LED_H; |
+ |
+ START_TX; |
+ ChkSum = 0; |
+ for (i=0;i<3;i++) RF_WRITE_DATA(0xAA); |
+ RF_WRITE_DATA(0x2D); |
+ RF_WRITE_DATA(0xD4); |
+ |
+ for (i=0;i<16;i++) |
+ { |
+ RF_WRITE_DATA(test[i]); |
+ ChkSum += test[i]; |
+ } |
+ RF_WRITE_DATA(ChkSum); |
+ RF_WRITE_DATA(0xAA); |
+ RF_WRITE_DATA(0xAA); |
+ STOP_TX; |
+ |
+ LED_L; |
+ delay_ms(500); |
+ j++; |
+ test[13]=(j/100)+0x30; |
+ test[14]=((j%100)/10)+0x30; |
+ test[15]=((j%100)%10)+0x30; |
+ } |
+ return 0; |
+} |
+ |
+ |
+ |
/Designs/Data_loggers/DOGFINDER02A/SW/DOGFINDER_TX.hex |
---|
0,0 → 1,35 |
:1000000012C02CC02BC02AC029C028C027C026C0BF |
:1000100025C024C023C022C021C020C01FC01EC0D4 |
:100020001DC01CC01BC011241FBECFE5D4E0DEBF25 |
:10003000CDBF10E0A0E6B0E0E2EFF1E002C0059035 |
:100040000D92A237B107D9F710E0A2E7B0E001C0E6 |
:100050001D92A237B107E1F73ED0C9C0D1CF2AEF38 |
:1000600030E004C0F9013197F1F701970097D1F71B |
:100070000895BB9ABD9A8A98BA9AA19AA39A0895AC |
:10008000C29AC39AC59880B3A99A0895C598C29890 |
:1000900020E0C598C59897FF02C0C39A01C0C398D5 |
:1000A000C59AC59A2F5F203119F0880F991FF1CF9B |
:1000B000C598C29A089590E08299FECF829BFECFA8 |
:1000C00087FF02C0A99A01C0A9989F5F983011F0DC |
:1000D000880FF2CF0895EF92FF920F931F93CF9363 |
:1000E000DF93BB9ABD9A8A98BA9AA19AA39AC29AA8 |
:1000F000C39AC59880B3A99AAB9A24E630E04AEF38 |
:1001000050E003C0CA010197F1F7215030408FEF52 |
:100110002F3F3807B9F780E09CECB8DF82E790E921 |
:10012000B5DF80E496EAB2DF80E490EDAFDF87E4EC |
:1001300098ECACDF80E292ECA9DF81E090ECA6DFE6 |
:1001400080E090EBA3DF00E04AEFE42EF12CAB9AC5 |
:1001500089E390EC9BDF8AEAAEDF8AEAACDF8AEAC9 |
:10016000AADF8DE2A8DF84EDA6DFC0E6D0E010E0D4 |
:100170008881A1DF8991180F20E0C037D207C1F72D |
:10018000812F99DF8AEA97DF8AEA95DF81E090EC98 |
:100190007DDFAB9884EF91E003C0F7013197F1F771 |
:1001A00001972FEF8F3F9207C1F70F5F802F64E613 |
:1001B00012D0805D80936D00802F0DD0292F892F64 |
:1001C0006AE009D0805D80936E00822F04D0905D3C |
:1001D00090936F00BCCF991B79E004C0991F9617CC |
:1001E00008F0961B881F7A95C9F780950895F894B2 |
:0201F000FFCF3F |
:1001F2000A0D41546D65676131360A0D202D2D2D92 |
:020202000000FA |
:00000001FF |
/Designs/Data_loggers/DOGFINDER02A/SW/DOGFINDER_TX.map |
---|
0,0 → 1,363 |
Archive member included because of file (symbol) |
/usr/lib/gcc/avr/4.3.0/avr4/libgcc.a(_udivmodqi4.o) |
DOGFINDER_TX.o (__udivmodqi4) |
/usr/lib/gcc/avr/4.3.0/avr4/libgcc.a(_exit.o) |
/usr/lib/gcc/avr/4.3.0/../../../../avr/lib/avr4/crtm8.o (exit) |
/usr/lib/gcc/avr/4.3.0/avr4/libgcc.a(_copy_data.o) |
DOGFINDER_TX.o (__do_copy_data) |
/usr/lib/gcc/avr/4.3.0/avr4/libgcc.a(_clear_bss.o) |
DOGFINDER_TX.o (__do_clear_bss) |
Memory Configuration |
Name Origin Length Attributes |
text 0x00000000 0x00002000 xr |
data 0x00800060 0x0000ffa0 rw !x |
eeprom 0x00810000 0x00010000 rw !x |
fuse 0x00820000 0x00000400 rw !x |
lock 0x00830000 0x00000400 rw !x |
signature 0x00840000 0x00000400 rw !x |
*default* 0x00000000 0xffffffff |
Linker script and memory map |
LOAD /usr/lib/gcc/avr/4.3.0/../../../../avr/lib/avr4/crtm8.o |
LOAD DOGFINDER_TX.o |
LOAD /usr/lib/gcc/avr/4.3.0/avr4/libgcc.a |
LOAD /usr/lib/gcc/avr/4.3.0/../../../../avr/lib/avr4/libc.a |
LOAD /usr/lib/gcc/avr/4.3.0/avr4/libgcc.a |
.hash |
*(.hash) |
.dynsym |
*(.dynsym) |
.dynstr |
*(.dynstr) |
.gnu.version |
*(.gnu.version) |
.gnu.version_d |
*(.gnu.version_d) |
.gnu.version_r |
*(.gnu.version_r) |
.rel.init |
*(.rel.init) |
.rela.init |
*(.rela.init) |
.rel.text |
*(.rel.text) |
*(.rel.text.*) |
*(.rel.gnu.linkonce.t*) |
.rela.text |
*(.rela.text) |
*(.rela.text.*) |
*(.rela.gnu.linkonce.t*) |
.rel.fini |
*(.rel.fini) |
.rela.fini |
*(.rela.fini) |
.rel.rodata |
*(.rel.rodata) |
*(.rel.rodata.*) |
*(.rel.gnu.linkonce.r*) |
.rela.rodata |
*(.rela.rodata) |
*(.rela.rodata.*) |
*(.rela.gnu.linkonce.r*) |
.rel.data |
*(.rel.data) |
*(.rel.data.*) |
*(.rel.gnu.linkonce.d*) |
.rela.data |
*(.rela.data) |
*(.rela.data.*) |
*(.rela.gnu.linkonce.d*) |
.rel.ctors |
*(.rel.ctors) |
.rela.ctors |
*(.rela.ctors) |
.rel.dtors |
*(.rel.dtors) |
.rela.dtors |
*(.rela.dtors) |
.rel.got |
*(.rel.got) |
.rela.got |
*(.rela.got) |
.rel.bss |
*(.rel.bss) |
.rela.bss |
*(.rela.bss) |
.rel.plt |
*(.rel.plt) |
.rela.plt |
*(.rela.plt) |
.text 0x00000000 0x1f2 |
*(.vectors) |
.vectors 0x00000000 0x26 /usr/lib/gcc/avr/4.3.0/../../../../avr/lib/avr4/crtm8.o |
0x00000000 __vectors |
0x00000000 __vector_default |
*(.vectors) |
*(.progmem.gcc*) |
*(.progmem*) |
0x00000026 . = ALIGN (0x2) |
0x00000026 __trampolines_start = . |
*(.trampolines) |
.trampolines 0x00000026 0x0 linker stubs |
*(.trampolines*) |
0x00000026 __trampolines_end = . |
*(.jumptables) |
*(.jumptables*) |
*(.lowtext) |
*(.lowtext*) |
0x00000026 __ctors_start = . |
*(.ctors) |
0x00000026 __ctors_end = . |
0x00000026 __dtors_start = . |
*(.dtors) |
0x00000026 __dtors_end = . |
SORT(*)(.ctors) |
SORT(*)(.dtors) |
*(.init0) |
.init0 0x00000026 0x0 /usr/lib/gcc/avr/4.3.0/../../../../avr/lib/avr4/crtm8.o |
0x00000026 __init |
*(.init0) |
*(.init1) |
*(.init1) |
*(.init2) |
.init2 0x00000026 0xc /usr/lib/gcc/avr/4.3.0/../../../../avr/lib/avr4/crtm8.o |
*(.init2) |
*(.init3) |
*(.init3) |
*(.init4) |
.init4 0x00000032 0x16 /usr/lib/gcc/avr/4.3.0/avr4/libgcc.a(_copy_data.o) |
0x00000032 __do_copy_data |
.init4 0x00000048 0x10 /usr/lib/gcc/avr/4.3.0/avr4/libgcc.a(_clear_bss.o) |
0x00000048 __do_clear_bss |
*(.init4) |
*(.init5) |
*(.init5) |
*(.init6) |
*(.init6) |
*(.init7) |
*(.init7) |
*(.init8) |
*(.init8) |
*(.init9) |
.init9 0x00000058 0x4 /usr/lib/gcc/avr/4.3.0/../../../../avr/lib/avr4/crtm8.o |
*(.init9) |
*(.text) |
.text 0x0000005c 0x2 /usr/lib/gcc/avr/4.3.0/../../../../avr/lib/avr4/crtm8.o |
0x0000005c __vector_1 |
0x0000005c __vector_12 |
0x0000005c __bad_interrupt |
0x0000005c __vector_6 |
0x0000005c __vector_3 |
0x0000005c __vector_11 |
0x0000005c __vector_13 |
0x0000005c __vector_17 |
0x0000005c __vector_7 |
0x0000005c __vector_5 |
0x0000005c __vector_4 |
0x0000005c __vector_9 |
0x0000005c __vector_2 |
0x0000005c __vector_15 |
0x0000005c __vector_8 |
0x0000005c __vector_14 |
0x0000005c __vector_10 |
0x0000005c __vector_16 |
0x0000005c __vector_18 |
.text 0x0000005e 0x178 DOGFINDER_TX.o |
0x0000008c RF_WRITE_CMD |
0x000000d6 main |
0x0000005e delay_ms |
0x00000080 RF_INIT |
0x00000072 IO_INIT |
0x000000b6 RF_WRITE_DATA |
.text 0x000001d6 0x0 /usr/lib/gcc/avr/4.3.0/avr4/libgcc.a(_udivmodqi4.o) |
.text 0x000001d6 0x0 /usr/lib/gcc/avr/4.3.0/avr4/libgcc.a(_exit.o) |
.text 0x000001d6 0x0 /usr/lib/gcc/avr/4.3.0/avr4/libgcc.a(_copy_data.o) |
.text 0x000001d6 0x0 /usr/lib/gcc/avr/4.3.0/avr4/libgcc.a(_clear_bss.o) |
0x000001d6 . = ALIGN (0x2) |
*(.text.*) |
.text.libgcc 0x000001d6 0x18 /usr/lib/gcc/avr/4.3.0/avr4/libgcc.a(_udivmodqi4.o) |
0x000001d6 __udivmodqi4 |
.text.libgcc 0x000001ee 0x0 /usr/lib/gcc/avr/4.3.0/avr4/libgcc.a(_exit.o) |
.text.libgcc 0x000001ee 0x0 /usr/lib/gcc/avr/4.3.0/avr4/libgcc.a(_copy_data.o) |
.text.libgcc 0x000001ee 0x0 /usr/lib/gcc/avr/4.3.0/avr4/libgcc.a(_clear_bss.o) |
0x000001ee . = ALIGN (0x2) |
*(.fini9) |
.fini9 0x000001ee 0x0 /usr/lib/gcc/avr/4.3.0/avr4/libgcc.a(_exit.o) |
0x000001ee exit |
0x000001ee _exit |
*(.fini9) |
*(.fini8) |
*(.fini8) |
*(.fini7) |
*(.fini7) |
*(.fini6) |
*(.fini6) |
*(.fini5) |
*(.fini5) |
*(.fini4) |
*(.fini4) |
*(.fini3) |
*(.fini3) |
*(.fini2) |
*(.fini2) |
*(.fini1) |
*(.fini1) |
*(.fini0) |
.fini0 0x000001ee 0x4 /usr/lib/gcc/avr/4.3.0/avr4/libgcc.a(_exit.o) |
*(.fini0) |
0x000001f2 _etext = . |
.data 0x00800060 0x12 load address 0x000001f2 |
0x00800060 PROVIDE (__data_start, .) |
*(.data) |
.data 0x00800060 0x0 /usr/lib/gcc/avr/4.3.0/../../../../avr/lib/avr4/crtm8.o |
.data 0x00800060 0x11 DOGFINDER_TX.o |
0x00800060 test |
.data 0x00800071 0x0 /usr/lib/gcc/avr/4.3.0/avr4/libgcc.a(_udivmodqi4.o) |
.data 0x00800071 0x0 /usr/lib/gcc/avr/4.3.0/avr4/libgcc.a(_exit.o) |
.data 0x00800071 0x0 /usr/lib/gcc/avr/4.3.0/avr4/libgcc.a(_copy_data.o) |
.data 0x00800071 0x0 /usr/lib/gcc/avr/4.3.0/avr4/libgcc.a(_clear_bss.o) |
*(.data*) |
*(.rodata) |
*(.rodata*) |
*(.gnu.linkonce.d*) |
0x00800072 . = ALIGN (0x2) |
*fill* 0x00800071 0x1 00 |
0x00800072 _edata = . |
0x00800072 PROVIDE (__data_end, .) |
.bss 0x00800072 0x0 load address 0x00000204 |
0x00800072 PROVIDE (__bss_start, .) |
*(.bss) |
.bss 0x00800072 0x0 /usr/lib/gcc/avr/4.3.0/../../../../avr/lib/avr4/crtm8.o |
.bss 0x00800072 0x0 DOGFINDER_TX.o |
.bss 0x00800072 0x0 /usr/lib/gcc/avr/4.3.0/avr4/libgcc.a(_udivmodqi4.o) |
.bss 0x00800072 0x0 /usr/lib/gcc/avr/4.3.0/avr4/libgcc.a(_exit.o) |
.bss 0x00800072 0x0 /usr/lib/gcc/avr/4.3.0/avr4/libgcc.a(_copy_data.o) |
.bss 0x00800072 0x0 /usr/lib/gcc/avr/4.3.0/avr4/libgcc.a(_clear_bss.o) |
*(.bss*) |
*(COMMON) |
0x00800072 PROVIDE (__bss_end, .) |
0x000001f2 __data_load_start = LOADADDR (.data) |
0x00000204 __data_load_end = (__data_load_start + SIZEOF (.data)) |
.noinit 0x00800072 0x0 |
0x00800072 PROVIDE (__noinit_start, .) |
*(.noinit*) |
0x00800072 PROVIDE (__noinit_end, .) |
0x00800072 _end = . |
0x00800072 PROVIDE (__heap_start, .) |
.eeprom 0x00810000 0x0 |
*(.eeprom*) |
0x00810000 __eeprom_end = . |
.fuse |
*(.fuse) |
*(.lfuse) |
*(.hfuse) |
*(.efuse) |
.lock |
*(.lock*) |
.signature |
*(.signature*) |
.stab 0x00000000 0x1008 |
*(.stab) |
.stab 0x00000000 0x6b4 /usr/lib/gcc/avr/4.3.0/../../../../avr/lib/avr4/crtm8.o |
.stab 0x000006b4 0x954 DOGFINDER_TX.o |
0x960 (size before relaxing) |
.stabstr 0x00000000 0x88f |
*(.stabstr) |
.stabstr 0x00000000 0x88f /usr/lib/gcc/avr/4.3.0/../../../../avr/lib/avr4/crtm8.o |
.stab.excl |
*(.stab.excl) |
.stab.exclstr |
*(.stab.exclstr) |
.stab.index |
*(.stab.index) |
.stab.indexstr |
*(.stab.indexstr) |
.comment |
*(.comment) |
.debug |
*(.debug) |
.line |
*(.line) |
.debug_srcinfo |
*(.debug_srcinfo) |
.debug_sfnames |
*(.debug_sfnames) |
.debug_aranges |
*(.debug_aranges) |
.debug_pubnames |
*(.debug_pubnames) |
.debug_info |
*(.debug_info) |
*(.gnu.linkonce.wi.*) |
.debug_abbrev |
*(.debug_abbrev) |
.debug_line |
*(.debug_line) |
.debug_frame |
*(.debug_frame) |
.debug_str |
*(.debug_str) |
.debug_loc |
*(.debug_loc) |
.debug_macinfo |
*(.debug_macinfo) |
OUTPUT(DOGFINDER_TX.out elf32-avr) |
LOAD linker stubs |
/Designs/Data_loggers/DOGFINDER02A/SW/DOGFINDER_TX.o |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/Designs/Data_loggers/DOGFINDER02A/SW/DOGFINDER_TX.out |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Added: svn:executable |
+* |
\ No newline at end of property |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/Designs/Data_loggers/DOGFINDER02A/SW/Makefile |
---|
0,0 → 1,25 |
# makefile, written by kaklik |
MCU=atmega8 |
CC=avr-gcc |
OBJCOPY=avr-objcopy |
# optimize for size: |
CFLAGS=-g -mmcu=$(MCU) -Wall -Wstrict-prototypes -Os -mcall-prologues |
#------------------- |
all: DOGFINDER_TX.hex |
#------------------- |
help: |
@echo "Usage: make all|load|load_pre|rdfuses|wrfuse1mhz|wrfuse4mhz|wrfusecrystal" |
@echo "Warning: you will not be able to undo wrfusecrystal unless you connect an" |
@echo " external crystal! uC is dead after wrfusecrystal if you do not" |
@echo " have an external crystal." |
#------------------- |
DOGFINDER_TX.hex : DOGFINDER_TX.out |
$(OBJCOPY) -R .eeprom -O ihex DOGFINDER_TX.out DOGFINDER_TX.hex |
DOGFINDER_TX.out : DOGFINDER_TX.o |
$(CC) $(CFLAGS) -o DOGFINDER_TX.out -Wl,-Map,DOGFINDER_TX.map DOGFINDER_TX.o |
DOGFINDER_TX.o : DOGFINDER_TX.c |
$(CC) $(CFLAGS) -Os -c DOGFINDER_TX.c |
#------------------- |
clean: |
rm -f *.o *.map *.out *.hex |
#------------------- |
/Designs/Data_loggers/DOGFINDER02A/SW/Makefile~ |
---|
0,0 → 1,25 |
# makefile, written by kaklik |
MCU=atmega8 |
CC=avr-gcc |
OBJCOPY=avr-objcopy |
# optimize for size: |
CFLAGS=-g -mmcu=$(MCU) -Wall -Wstrict-prototypes -Os -mcall-prologues |
#------------------- |
all: DOGFINDER_TX.hex |
#------------------- |
help: |
@echo "Usage: make all|load|load_pre|rdfuses|wrfuse1mhz|wrfuse4mhz|wrfusecrystal" |
@echo "Warning: you will not be able to undo wrfusecrystal unless you connect an" |
@echo " external crystal! uC is dead after wrfusecrystal if you do not" |
@echo " have an external crystal." |
#------------------- |
DOGFINDER_TX.hex : DOGFINDER_TX.out |
$(OBJCOPY) -R .eeprom -O ihex DOGFINDER_TX.out DOGFINDER_TX.hex |
DOGFINDER_TX.out : DOGFINDER_TX.o |
$(CC) $(CFLAGS) -o DOGFINDER_TX.out -Wl,-Map,DOGFINDER_TX.map DOGFINDER_TX.o |
DOGFINDER_TX.o : DOGFINDER_TX.c |
$(CC) $(CFLAGS) -Os -c DOGFINDER_TX.c |
#------------------- |
clean: |
rm -f *.o *.map *.out *t.hex |
#------------------- |
/Designs/Data_loggers/DOGFINDER02A/SW/RFM02.h |
---|
0,0 → 1,82 |
/* mija 2008 |
defines for module RFM02 - TX 868MHz |
*/ |
#define CMD_SETTING 0x8000 // b1, b0, d2..d0, x3..x0, ms, m2..m0 |
#define CMD_POWER 0xC000 // a1, a0, ex, es, ea, eb, et, dc |
#define CMD_POWER_OUT 0xB000 // p2..p0 -3*Pmax dBm |
#define CMD_FREQUENCY 0xA000 // f11..f0 860+F*0.005 MHz 36..3903 |
#define CMD_RATE 0xC800 // r7..r0 BR=10M/29/(R+1) |
#define CMD_WAKE_UP 0xE000 // r4..r0, m7..m0 T=M*2^R [ms] |
#define CMD_SLEEP 0xC400 // s7..s0 S stop CLK |
#define CMD_BATTERY 0xC200 // dwc, ebs , t4..t0 |
#define CMD_STATUS 0xCC00 // for read status |
// CMD_SETTING |
#define BAND_315 0x0000 |
#define BAND_433 0x800 |
#define BAND_868 0x1000 |
#define BADN_915 0x1800 |
#define C_8_5pF 0x00 |
#define C_9pF 0x10 |
#define C_9_5pF 0x20 |
#define C_10pF 0x30 |
#define C_10_5pF 0x40 |
#define C_11pF 0x50 |
#define C_11_5pF 0x60 |
#define C_12pF 0x70 |
#define C_12_5pF 0x80 |
#define C_13pF 0x90 |
#define C_13_5pF 0xA0 |
#define C_14pF 0xB0 |
#define C_14_5pF 0xC0 |
#define C_15pF 0xD0 |
#define C_15_5pF 0xE0 |
#define C_16pF 0xF0 |
#define SETTING_MS 0x08 // modulation polarity |
#define TX_DEV_30 0x00 // select frequency deviation |
#define TX_DEV_60 0x01 |
#define TX_DEV_90 0x02 |
#define TX_DEV_120 0x03 |
#define TX_DEV_150 0x04 |
#define TX_DEV_180 0x05 |
#define TX_DEV_210 0x06 |
// CMD_POWER |
#define POWER_A1 0x80 // enable crystal and syntheesizer by sleep |
#define POWER_A0 0x40 // enable PA by sleep |
#define POWER_EX 0x20 // enable transmitter |
#define POWER_ES 0x10 // enable synthesizer |
#define POWER_EA 0x08 // enable PA (power amplifier) |
#define POWER_EB 0x04 // enable low battery detector |
#define POWER_ET 0x02 // enable wake up timer |
#define POWER_DC 0x01 // disable clock output of CLK pin |
// CMD_POWER_OUT |
#define POWER_OUT_0 0xB000 // -0dBm |
#define POWER_OUT_3 0xB100 // -3dBm |
#define POWER_OUT_6 0xB200 // -6dBm |
#define POWER_OUT_9 0xB300 // -9dBm |
#define POWER_OUT_12 0xB400 // -12dBm |
#define POWER_OUT_15 0xB500 // -15dBm |
#define POWER_OUT_18 0xB600 // -18dBm |
#define POWER_OUT_21 0xB700 // -21dBm |
// CMD_FREQUENCY |
#define FREQUENCY_867 0x578 |
#define FREQUENCY_868 0x640 |
#define FREQUENCY_869 0x708 |
// CMD_RATE |
#define RATE_2400 0x8F |
#define RATE_4800 0x47 |
#define RATE_9600 0x23 |
#define RATE_19200 0x11 |
#define RATE_38400 0x8 |
#define RATE_57600 0x5 |
#define RATE_115200 0x2 |
// CMD_BATTERY |
#define WAKE_UP_DWC 0x80 // disable wake-up timer periodical calibration |
#define TX_EBS 0x20 // enable TX bit synchronization function |
/Designs/Data_loggers/DOGFINDER02A/SW/TX_RFM02.c~ |
---|
0,0 → 1,199 |
/* mija 2008 |
demo for RFM02 - TX 868MHz |
CPU ATMEGA16 |
fcpu = 1MHz |
!! define PIN,PORT,DDR for IOpin !! |
tested with module RFM12B RX 9600 BW 134kHz |
*/ |
#include <avr/io.h> |
#include <util/delay.h> |
#include "RFM02.h" |
#define F_CPU 1000000UL |
//************************************************************************ |
#define SDI PB3 |
#define SDI_PORT PORTB |
#define SDI_DDR DDRB |
#define FSK PC1 |
#define FSK_PORT PORTC |
#define FSK_DDR DDRC |
#define SDO PB4 // input for mega |
#define SDO_PORT PORTB |
#define SDO_DDR DDRB |
#define SDO_PIN PINB |
#define SCK PB5 |
#define SCK_PORT PORTB |
#define SCK_DDR DDRB |
#define nIRQ PD2 // input for mega |
#define nIRQ_PORT PORTD |
#define nIRQ_DDR DDRD |
#define nIRQ_PIN PIND |
#define nSEL PB2 |
#define nSEL_PORT PORTB |
#define nSEL_DDR DDRB |
#define LED PC3 |
#define LED_PORT PORTC |
#define LED_DDR DDRC |
// interni |
#define SDI_H SDI_PORT |= _BV(SDI) |
#define SDI_L SDI_PORT &= (~(_BV(SDI))) |
#define SDI_INIT SDI_DDR |= _BV(SDI) |
#define FSK_H FSK_PORT |= _BV(FSK) |
#define FSK_L FSK_PORT &= (~(_BV(FSK))) |
#define FSK_INIT FSK_DDR |= _BV(FSK) |
#define SDO_INPUT (SDO_PIN & _BV(SDO)) |
#define SDO_INIT SDO_DDR &= (~(_BV(SDO))) |
#define SCK_H SCK_PORT |= _BV(SCK) |
#define SCK_L SCK_PORT &= (~(_BV(SCK))) |
#define SCK_INIT SCK_DDR |= _BV(SCK) |
#define nIRQ_INPUT (nIRQ_PIN & _BV(nIRQ)) |
#define nIRQ_INIT nIRQ_DDR &= (~(_BV(nIRQ))) |
#define nSEL_H nSEL_PORT |= _BV(nSEL) |
#define nSEL_L nSEL_PORT &= (~(_BV(nSEL))) |
#define nSEL_INIT nSEL_DDR |= _BV(nSEL) |
#define LED_H LED_PORT |= _BV(LED) |
#define LED_L LED_PORT &= (~(_BV(LED))) |
#define LED_INIT LED_DDR |= _BV(LED) |
#define START_TX RF_WRITE_CMD(CMD_POWER|POWER_EX|POWER_ES|POWER_EA|POWER_DC) |
#define STOP_TX RF_WRITE_CMD(CMD_POWER|POWER_DC) |
//************************************************************************ |
//uint8_t test[16]={0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3a,0x03b,0x3c,0x3d,0x3e,0x3f}; |
uint8_t test[17]="\n\rATmega16\n\r ---"; |
//uint8_t test[16]="0123456789abcdef"; |
//************************************************************************ |
void delay_ms(uint16_t time) |
{ |
while(time--) _delay_ms(1); |
} |
void IO_INIT(void) |
{ |
SDI_INIT; |
SDO_INIT; |
SCK_INIT; |
nIRQ_INIT; |
nSEL_INIT; |
FSK_INIT; |
LED_INIT; |
} |
void RF_INIT(void) |
{ |
nSEL_H; |
SDI_H; |
SCK_L; |
nIRQ_INPUT; |
SDO_INPUT; |
FSK_H; |
} |
void RF_WRITE_CMD(uint16_t cmd) |
{ |
uint8_t i; |
SCK_L; |
nSEL_L; |
for (i=0;i<16;i++) |
{ |
SCK_L; |
SCK_L; |
if (cmd & 0x8000) SDI_H; |
else SDI_L; |
SCK_H; |
SCK_H; |
cmd <<= 1; |
} |
SCK_L; |
nSEL_H; |
} |
void RF_WRITE_DATA(uint8_t data) |
{ |
uint8_t i; |
for (i=0;i<8;i++) |
{ |
while (nIRQ_INPUT); |
while (!nIRQ_INPUT); |
if (data & 0x80)FSK_H; |
else FSK_L; |
data <<= 1; |
} |
} |
int main() |
{ |
uint8_t i,j,ChkSum; |
IO_INIT(); |
RF_INIT(); |
LED_H; |
delay_ms(100); |
RF_WRITE_CMD(CMD_STATUS); |
RF_WRITE_CMD(CMD_SETTING |BAND_868 |C_12pF |TX_DEV_90); |
RF_WRITE_CMD(CMD_FREQUENCY |FREQUENCY_868); |
RF_WRITE_CMD(0xD040); |
RF_WRITE_CMD(CMD_RATE |RATE_19200); |
RF_WRITE_CMD(CMD_BATTERY |TX_EBS); |
RF_WRITE_CMD(CMD_POWER |POWER_DC); |
RF_WRITE_CMD(POWER_OUT_0); |
j= 0; |
while (1) |
{ |
LED_H; |
START_TX; |
ChkSum = 0; |
for (i=0;i<3;i++) RF_WRITE_DATA(0xAA); |
RF_WRITE_DATA(0x2D); |
RF_WRITE_DATA(0xD4); |
for (i=0;i<16;i++) |
{ |
RF_WRITE_DATA(test[i]); |
ChkSum += test[i]; |
} |
RF_WRITE_DATA(ChkSum); |
RF_WRITE_DATA(0xAA); |
RF_WRITE_DATA(0xAA); |
STOP_TX; |
LED_L; |
delay_ms(500); |
j++; |
test[13]=(j/100)+0x30; |
test[14]=((j%100)/10)+0x30; |
test[15]=((j%100)%10)+0x30; |
} |
return 0; |
} |
/Designs/Data_loggers/GMCOUNT/PrjInfo.txt |
---|
0,0 → 1,17 |
// |
// Toto je popisný soubor pro popis obsahu adresáře (příklad) |
// |
[InfoShortDescription.en] |
Some radioactivity intensimeter |
[InfoShortDescription.cs] |
Geiger-Müllerův počítač |
[InfoLongDescription.en] |
A counter is based on Geiger-Müller tube. Powered by internal Li-ion cell and voltage converter. It can log data in time domain and then it can send log to a computer. |
[InfoLongDescription.cs] |
Zaznamenává intenzity v průběhu času do paměti a následně je umožnoje uložit do počítače. Je napájen z integrované Li-ion baterie a vlastního měniče. |
[End] |
/Designs/Data_loggers/GMCOUNT/SW/GMC01A.c |
---|
0,0 → 1,551 |
#include <16F876A.h> |
#device adc=10 |
#FUSES NOWDT //No Watch Dog Timer |
#FUSES NOLVP,NOPROTECT,XT,NOBROWNOUT |
#use delay(clock=4000000) |
//#define EEPROM_SCL PIN_C3 |
//#define EEPROM_SDA PIN_C4 |
#use rs232(baud=9600,xmit=PIN_C6,disable_ints) |
//#use i2c(Master,Fast,sda=PIN_C4,scl=PIN_C3) |
#define LCD_RS PIN_C7 // rizeni registru LCD displeje <lcd.c> |
#define LCD_E PIN_B7 // enable LCD displeje <lcd.c> |
#define LCD_D0 PIN_B3 // data LCD <lcd.c> |
#define LCD_D1 PIN_B2 |
#define LCD_D2 PIN_B1 |
#define LCD_D3 PIN_B0 |
#define PWM_OUT PIN_C2 // kontrast LCD - menic |
#define LCD_ENABLE PIN_A1 |
#define GM_PIN PIN_A4 // vstup od GMT |
#define HV_ENABLE PIN_A3 // start 400V |
#define CHARGE PIN_A2 // nabijeni baterie |
#define KBD_K4 0 //tlacitko na PIN_B7 neexistuje <kbd.c> |
#define TL3 0x10 //tlacitko PIN_B4 -ostatni default, viz <kbd.c> |
#define TL2 0x20 //tlacitko PIN_B5 <kbd.c> |
#define TL1 0x40 //tlacitko PIN_B6 <kbd.c> |
#define KBD_CALMTIME 1 //x*40ms - doba na zakmity tlacitek <kbd.c> |
#define KEYDELAY 30 //x*40ms - doba podrzeni tlacitka do opakovani |
#define KEYREPEAT 6 //x*40ms - doba opakovani stiskleho tlacitka |
#define LOG_PERIOD 30 //perioda logovani v min |
#define TIME_TO_SLEEP 19 //x*16s - doba do uspani, pokud zadny stisk a HV nebezi |
#define MAX_EEPROM 255 //max velikost vnitrni ee pameti |
#define EE_LOG_SWITCH 1 //misto v ee, kam se uklada zpusob logovani |
#define EE_LOG_OFFSET 0 //misto v ee, kde je ulozen offset dalsiho volneho mista |
#define ECHO_MAX_CYCLE 700 //ryhlost hlavni smyèky za 40ms /cca 20kHz/ (700) |
#define ECHO_PIN1 PIN_C4 //piezo |
#define ECHO_PIN2 PIN_C5 //piezo |
#define TEST_V_BATT 0x0f //maska minut pro test baterie |
#define BATT_ENABLE 525 //1024/ADC*1.5+0.18 ADC=525 .. Ubat=3.1V; jeli Ubat nizsi pak sleep |
#include <lcd.c> |
#include <kbd.c> |
int8 ms7RTC,sRTC,mRTC,hRTC,dRTC,mdRTC,yRTC; //promenne RTC |
int1 vypocet,refresh,counters,sleep,log,piezo; //povoleni vypoctu,zobrazeni,citani,uspani,logovani,cvak pieza |
int16 avg,bkg,min,max,dif; //hlavni zobrazované promìnne |
int32 gmcount,mincount; //citac trubice GM,citac minut od startu |
int8 timer_n,timer_s; //citace pulzù do 40ms, v celych 40ms, v predchozi 40ms |
int32 gmcount_p; //pocet pulzu od zapnuti v predchozi cele minute |
int32 gmcount_sm; //pocet pulzu od zapnuti precteno v cele minute |
int8 s25tik,sTIK; //tiky pro casovani trubice 25tiku do sekundy, 60s do min |
int8 key_timer,save_key,keyp; //pomocny citac pro tlacitka,ulozeni stiskleho tlacitka,provedeni akce stiskleho tl. |
int8 menu_A,menu_B; //vektor pro pohyb v menu na LCD |
int8 log_interval; //minutovy citac do dalsiho logu |
int8 log_switch; //prepinac zpusobu logovani |
int8 ee_offset; //kam v ee ulozit dalsi zaznam |
int8 echo_switch,echo_tik; //povolení echa,poèet tiku za 40ms |
int16 echo_timer,echo_cycle; //èitaè rychlosti smyèky pro echo,cvaknuti v cyklu |
int8 pwm; //kontrast |
int8 tik_to_sleep; //casovac pro uspani |
float analog; //napeti baterie |
int1 test_batt; //test napeti baterie |
int1 test; //pokus |
int8 timertest; //pokus |
#priority timer2,timer1,rb |
#int_TIMER2 //nastaven presne na 40ms,cte casovac timer0 GMT |
TIMER2_isr() |
{ |
kbd_ticktimer(); |
if (key_timer) key_timer--; |
if (!counters) {set_timer0(0);s25TIK=0;sTIK=0;return;} |
if (echo_switch) echo_switch=2; |
timer_n=get_timer0(); |
s25TIK++; |
if (timer_n!=timer_s) //nastala zmena v citaci,pak proved pricteni puslu |
{ |
if (timer_n < timer_s) {timer_s=256-timer_s+timer_n;gmcount=gmcount+timer_s;} //test preteceni casovace |
else {timer_s=timer_n-timer_s;gmcount=gmcount+timer_s;} |
echo_tik=timer_s; |
timer_s=timer_n; |
if (menu_A==1 && menu_B==0) refresh=true; |
} |
else echo_tik=0; |
if (s25TIK==25) //cela sekunda |
{ |
s25TIK=0; |
sTIK++; |
if (menu_A==1 && menu_B==5) refresh=true; |
if (sTIK==60) //cela minuta |
{ |
sTIK=0; |
mincount++; |
vypocet=true; |
gmcount_sm=gmcount; |
} |
} |
} |
#int_RB |
RB_isr() |
{ |
kbd_pullkbd(); |
tik_to_sleep = TIME_TO_SLEEP; |
} |
int8 modulo(int8 h,int8 m) //pomocna fce pro modulo x |
{ |
if (h<m) return (h); |
return(h-m); |
} |
void clear_lcd() |
{ |
printf(lcd_putc,"\f"); |
} |
void set_date() //citac datumu |
{ |
dRTC++; |
switch (mdRTC) |
{ |
case 1: |
case 3: |
case 5: |
case 7: |
case 8: |
case 10: |
case 12: if(dRTC>=32) {dRTC=1;mdRTC++;if(mdRTC==13) {mdRTC =1;yRTC=modulo(yRTC++,100);}} break; |
case 4: |
case 6: |
case 9: |
case 11: if(dRTC>=31) {dRTC=1;mdRTC++;} break; |
case 2: if (dRTC >= 30) {dRTC=1;mdRTC++;break;} |
if (dRTC ==29) {if (!(yRTC & 0x03)) break;dRTC=1;mdRTC++;} |
} |
} |
#int_TIMER1 // RTC |
TIMER1_isr() |
{ |
sRTC=sRTC+16; |
if (sRTC >= 60) |
{ |
mRTC++;sRTC=modulo(sRTC,60); //1min |
if (mRTC>=60) {hRTC++;mRTC=0;} //1hod |
if ((mRTC & TEST_V_BATT) == TEST_V_BATT) test_batt=true; |
if (hRTC>=24) {hRTC=0;set_date();} //1den |
} |
refresh=true; |
if (tik_to_sleep) tik_to_sleep--; |
} |
void ee_head() //ulozeni hlavicky do ee cas,datum,zpusob logovani |
{ //v ee 100hhhhh /hodiny/,l0mmmmmm /log + minuty/,000ddddd /den/,yyyymmmm /rok-7,mesic/ |
int8 data; |
log=true; |
if (!log_switch) return; |
if (ee_offset>5) { |
data=read_eeprom(ee_offset-4); |
if (bit_test(data,7)) ee_offset=ee_offset-4; |
} |
if (ee_offset>=(MAX_EEPROM-5)) {log=false;return;} |
log_interval=0; |
data=hRTC; |
bit_set(data,7); |
write_eeprom(ee_offset++,data); |
data=mRTC; |
if (bit_test(log_switch,0)) bit_set(data,7); |
write_eeprom(ee_offset++,data); |
write_eeprom(ee_offset++,dRTC); |
data=((yRTC-7) << 4)|mdRTC; |
write_eeprom(ee_offset++,data); |
} |
void menu_proces(int8 key) //menu zobrazene na LCD pri citani |
{ |
switch (key) |
{ |
case TL1: menu_A=2;refresh=true;clear_lcd();return; |
case TL2: if (log) log=false; |
else ee_head(); |
break; |
case TL3: menu_B=modulo(++menu_B,6);break; |
} |
printf(lcd_putc,"\rdif=%lu ",dif); |
lcd_gotoxy(11,1); |
if (log) printf(lcd_putc,"L"); //pokud se loguje, zobraz L |
else printf(lcd_putc," "); |
if (bkg) printf(lcd_putc,"B"); //pokud jiz je BKG,zobraz B |
lcd_gotoxy(14,1); |
printf(lcd_putc,"%3u\n",(int8)(MAX_EEPROM-ee_offset)/2); //zbivajici misto v ee |
switch (menu_B) |
{ |
case 0: printf(lcd_putc,"n=%lu",gmcount);break; |
case 1: printf(lcd_putc,"min=%Lu",min);break; |
case 2: printf(lcd_putc,"max=%lu",max);break; |
case 3: printf(lcd_putc,"avg=%lu",avg);break; |
case 4: printf(lcd_putc,"bkg=%lu",bkg);break; |
case 5: printf(lcd_putc,"ontime=%lu:%02d ",mincount,sTIK);break; |
} |
} |
void send_data() //posle data z ee na rs232 9600 8N1 |
{ |
int8 i; |
int16 data; |
int8 *adr; |
for (i=2;i<ee_offset;i) |
{ |
adr=&data; |
*adr=read_eeprom(i++); |
if (bit_test(*adr,7)) //test, zda se nejedna o hlavicku v ee |
{ |
bit_clear(*adr,7); |
printf("\r\n%d:",*adr); |
*adr=read_eeprom(i++); |
printf("%02d ",(0x3f&*adr)); |
adr++;*adr=read_eeprom(i++); |
printf("%d/",*adr); |
*adr=read_eeprom(i++); |
printf("%02d/",*adr&0x0f); |
*adr=(*adr>>4)+7; |
printf("%02d ",*adr); |
adr--; |
if (bit_test(*adr,7)) printf("1min"); |
else {*adr=LOG_PERIOD;printf("%umin",*adr);} |
} |
else{ |
data=data<<8; |
*adr=read_eeprom(i++); |
printf("\r\n%lu",data); |
} |
} |
} |
void display(int8 key) //zobrazeni na LCD - zakladni menu |
{ |
int8 mon,year; //pomocne promenne |
if (key) clear_lcd(); |
keyp=0; |
refresh=false; |
if (menu_A>1) { //zmena pri stisku tl spolecna pro vetsinu menu_A |
if (key==TL3) {menu_A++;if (menu_A>11) menu_A=2;} //TL3 pak rolluj v menu_A |
if ( ( menu_A != 10 ) && ( menu_A != 6 ) && (menu_A != 11) ) |
{ |
if (key==TL1) |
{ |
if (counters) menu_A=1; |
else menu_A=0; |
key=0; |
} |
else printf(lcd_putc,"\r\nesc cr roll\r"); |
} |
} |
switch (menu_A) //hlavni menu |
{ |
case 0: min=0xffff; //zakladni menu po resetu, nastaveni promennych |
max=gmcount=gmcount_sm=gmcount_p=timer_s=timer_n=mincount=dif=avg=bkg=0; |
vypocet=sleep=counters=log=echo_switch=false; |
test_batt = true; |
log_switch=read_eeprom(EE_LOG_SWITCH); |
ee_offset=read_eeprom(EE_LOG_OFFSET); |
output_high(HV_ENABLE); |
printf(lcd_putc,"\r%d:%02d %d.%d.%02d \nmenu off start",hRTC,mRTC,dRTC,mdRTC,yRTC); |
switch (key) |
{ |
case TL1: menu_A=2;break; |
case TL2: menu_A=menu_B=0;sleep=true;break; |
case TL3: menu_A=1;menu_B=0; |
output_low(HV_ENABLE); |
printf(lcd_putc,"\fSTART HV 400V"); |
delay_ms(2000); |
counters=true; |
break; |
} |
if (key) {refresh=true;clear_lcd();} |
break; |
case 1: menu_proces(key);break; //skok na menu zobrazujici vypoctene a nacitane promenne |
case 3: if (key==TL2) {log_switch=modulo(++log_switch,3);write_eeprom(EE_LOG_SWITCH,log_switch);log=false;} |
switch (log_switch) |
{ |
case 0: printf(lcd_putc,"log \176 rs232");break; |
case 1: printf(lcd_putc,"log \176 eeprom 1m");break; |
case 2: mon=LOG_PERIOD;printf(lcd_putc,"log \176 eeprom %um",mon);break; |
//case 3: printf(lcd_putc,"log \176 off ");break; |
} |
break; |
case 9: printf(lcd_putc,"OFF (stand by)"); |
if (key==TL2) {menu_A=menu_B=0;sleep=true;output_high(HV_ENABLE);} |
break; |
case 8: if (key==TL2) if (echo_switch) echo_switch=0;else echo_switch=1; |
if (echo_switch) printf(lcd_putc,"echo on"); |
else printf(lcd_putc,"echo off"); |
break; |
case 4: if (key==TL2) send_data(); |
printf(lcd_putc,"send log \176 rs232"); |
break; |
case 5: if (key==TL2) {log=false;ee_offset=2;write_eeprom(EE_LOG_OFFSET,2);} |
printf(lcd_putc,"erase eeprom %3u",(int8)(MAX_EEPROM-ee_offset)/2); |
break; |
case 2: printf(lcd_putc,"STOP & clear"); |
if (key==TL2) {menu_A=0;menu_B=0;refresh=true;} |
break; |
case 7: printf(lcd_putc,"batterie "); |
//if (!input(CHARGE)) {printf(lcd_putc,"charge");break;} |
if ( key == TL2 || counters ) |
{ |
if ( !counters ) {output_low(HV_ENABLE);delay_ms(30);} |
analog = (float) (read_adc()); |
analog = 1024/analog*1.5 + 0.18; |
if ( !counters ) output_float(HV_ENABLE); |
printf(lcd_putc,"%1.2fV",analog); |
} |
break; |
case 6: if (key == TL2) {pwm++;if (pwm > 10) pwm --;} |
if (key == TL1) {pwm--;if (pwm < 2) pwm ++;} |
set_pwm1_duty(pwm); |
printf(lcd_putc,"contrast: %d\n - + roll",pwm); |
break; |
case 10: if (key==TL2) {set_timer1(0);sRTC=0;mRTC=modulo(++mRTC,60);} |
if (key==TL1) hRTC=modulo(++hRTC,24); |
printf(lcd_putc,"\rtime %2d:%02d\nhod min roll",hRTC,mRTC); |
break; |
case 11: if (key==TL1) {mon=mdRTC;year=yRTC;set_date();mdRTC=mon;year=yRTC;} |
if (key==TL2) {mon=dRTC;year=yRTC;dRTC=32;set_date();year=yRTC;} |
if (key==0x30) {mon=mdRTC;yRTC++;dRTC--;set_date();} |
printf(lcd_putc,"\rdate %2d.%02d.%02d\nday mon roll",dRTC,mdRTC,yRTC); |
break; |
} |
} |
void counters_fce() |
{ |
int8 *adr; |
if (vypocet) //1x za minutu se provede vypocet a log |
{ |
dif=gmcount_sm-gmcount_p; |
gmcount_p=gmcount_sm; |
avg=gmcount_sm/mincount; |
if (dif>max) max=dif; |
if (dif<min) min=dif; |
if (mincount==5) bkg=gmcount_sm/5; |
vypocet=false; |
refresh=true; |
if (log) |
{ |
//if (log_switch && (ee_offset>(MAX_EEPROM-2))) {log=false;return;} |
switch (log_switch) |
{ |
case 0: printf("\n\r%d:%02d %2d/%02d/%02d dif=%lu",hRTC,mRTC,dRTC,mdRTC,yRTC,dif);break; |
case 2: if (log_interval) break; |
case 1: adr=&dif;adr++;bit_clear(*adr,7); |
write_eeprom(ee_offset++,*adr); |
write_eeprom(ee_offset++,*(--adr)); |
write_eeprom(EE_LOG_OFFSET,ee_offset); |
if (ee_offset > (MAX_EEPROM-2)) log=false; |
break; |
} |
log_interval=modulo(++log_interval,LOG_PERIOD); |
} |
} |
} |
void echo_fce() |
{ |
int8 a,c; |
int16 b; |
if (!echo_tik || !counters) return; |
//if (echo_switch==2) {echo_switch=1;echo_cycle=ECHO_MAX_CYCLE/echo_tik;echo_timer=0;} |
if (echo_tik == 1) |
{ |
for (a=0;a<2;a++) {output_high(ECHO_PIN1);delay_us(160);output_low(ECHO_PIN1);delay_us(160);} |
echo_tik=0; |
} |
else /*if ((echo_timer == echo_cycle) || (!echo_timer))*/ |
{ |
echo_switch=1; |
c=echo_tik; |
if (echo_tik <40) {a=40/c;b=0;} |
if ((echo_tik >=40) && (echo_tik < 60)) {a=0;b=40000/c;} |
if (echo_tik >=60) {a=0;b=160;} |
while (echo_tik && (echo_switch==1) && !kbd_press()) |
{ |
echo_timer=0; |
output_high(ECHO_PIN1); |
delay_us(160); |
output_low(ECHO_PIN1); |
piezo=~piezo; |
delay_us(b); |
delay_ms(a); |
} |
//output_bit(ECHO_PIN2,piezo); |
} |
echo_timer++; |
} |
void pin_set_sleep() |
{ |
#use fast_IO(A) |
set_tris_A(0x15); |
output_A(0x2a); |
#use standard_IO(A) |
#use fast_IO(B) |
set_tris_B(0x70); |
output_B(0x8f); |
#use standard_IO(B) |
#use fast_IO(C) |
set_tris_C(0x2); |
output_C(0x84); |
#use standard_IO(C) |
} |
void sleep_fce() |
{ |
/*if (!input(CHARGE)) // pokud se nabiji, pak nespi |
{ |
printf(lcd_putc,"\fcharged batt"); |
tik_to_sleep = 0; |
while (!tik_to_sleep) if (input(CHARGE)) return; |
kbd_getc(); |
sleep = false; |
} |
else */ |
{ |
//setup_timer_0(RTCC_DIV_1|RTCC_INTERNAL); |
//setup_timer_1(T1_DISABLED); |
//setup_timer_2(T2_DIV_BY_16,249,10); |
counters=false; |
printf(lcd_putc,"\fchrrr"); |
delay_ms(1000); |
setup_adc_ports(ADC_OFF); |
setup_ccp1(CCP_OFF); |
//SET_TRIS_A(0xFF); |
//SET_TRIS_B(0xFF); |
//SET_TRIS_C(0xFF); |
pin_set_sleep(); |
do {sleep();delay_cycles(1);} while ( kbd_state!=0x20 /*&& input(CHARGE)*/ ); |
#use fast_IO(B) |
set_tris_B(0x70); |
output_B(0); |
#use standard_IO(B) |
setup_adc_ports(AN0); |
setup_adc(ADC_CLOCK_DIV_16); |
set_adc_channel(0); |
//setup_timer_0(RTCC_DIV_1|RTCC_EXT_L_TO_H); |
//setup_timer_2(T2_DIV_BY_16,249,10); |
//setup_ccp1(CCP_PWM); |
menu_A=menu_B=0; |
setup_ccp1(CCP_PWM); |
set_PWM1_duty(pwm); |
delay_ms(200); |
output_low(LCD_ENABLE); |
output_high(HV_ENABLE); |
lcd_init(); |
//printf(lcd_putc,"\fhello"); |
delay_ms(1000);kbd_getc(); |
keyp=0; |
sleep=false; |
refresh=true; |
} |
} |
void main() |
{ |
setup_adc_ports(AN0); |
setup_adc(ADC_CLOCK_DIV_16); |
set_adc_channel(0); |
setup_timer_0(RTCC_DIV_1|RTCC_EXT_L_TO_H); |
setup_timer_1(T1_EXTERNAL|T1_DIV_BY_8|T1_CLK_OUT); |
setup_timer_2(T2_DIV_BY_16,249,10); |
setup_ccp1(CCP_PWM); |
set_PWM1_duty(0x5); |
enable_interrupts(INT_TIMER2); |
enable_interrupts(INT_RB); |
enable_interrupts(INT_TIMER1); |
enable_interrupts(GLOBAL); |
output_low(LCD_ENABLE); |
KBD_init(); |
LCD_init(); |
pwm=5; |
sRTC=0; |
mRTC=0; |
hRTC=0; |
dRTC=18; |
mdRTC=10; |
yRTC=07; |
menu_A=menu_B=0; |
refresh=true; |
keyp=0; |
while (TRUE) |
{ |
if (refresh) display(keyp); //povoleni zobrazeni(menu + fce tlacitek) |
if (counters) { tik_to_sleep = TIME_TO_SLEEP;counters_fce();} //povoleni citacu,vypoctu a logovani |
else if (! tik_to_sleep) sleep = true; //necita a zadny stisk tlacitek do TIME_TO_SLEEP pak sleep |
if (echo_switch) echo_fce(); |
if (kbd_press()) //test stisku tlacitek,repeat, delay |
{ |
if (!save_key) {save_key=kbd_getc();keyp=save_key;refresh=true;key_timer=KEYDELAY;} //delay key |
if (!key_timer) {refresh=true;keyp=save_key;key_timer=KEYREPEAT;} //repeat key |
} |
else key_timer=save_key=keyp=0; |
//echo (piezo) |
if (test_batt && counters) //test napeti baterie |
{ |
if (read_adc() > BATT_ENABLE) |
{ |
printf(lcd_putc,"\flow batt"); |
delay_ms(2000); |
sleep = true; |
} |
test_batt=false; |
} |
if (sleep) sleep_fce(); //sleep |
//if (!timertest) {timertest=30;output_bit(PIN_C3,test);test=~test;} |
//timertest--; |
} |
} |
/Designs/Data_loggers/GMCOUNT/SW/GMC01A.hex |
---|
0,0 → 1,768 |
:1000000018308A0000280000FF00030E8301A100C1 |
:100010000A08A0008A010408A2007708A300780853 |
:10002000A4007908A5007A08A6007B08A70083131E |
:1000300083128C308400801C1F288C1842288C303E |
:100040008400001C25280C183F288B1D29280B181C |
:100050003C28220884002308F7002408F80025081B |
:10006000F9002608FA002708FB0020088A00210E64 |
:100070008300FF0E7F0E09008A110A12F32A8A11EB |
:100080000A12672B8A110A125F2A0A108A100A11B3 |
:10009000820728340C34013406340A108A100A11FD |
:1000A00082070C3400340A108A100A1182070D34BA |
:1000B0006434693466343D3425346C34753400342A |
:1000C0000A108A100A1182074C3400340A108A1070 |
:1000D0000A118207203400340A108A100A1182079C |
:1000E000423400340A108A100A1182076D346934D0 |
:1000F0006E343D3425344C34753400340A108A1083 |
:100100000A1182076D34613478343D3425346C34FF |
:10011000753400340A108A100A118207613476346B |
:1001200067343D3425346C34753400340A108A1039 |
:100130000A11820762346B3467343D3425346C34E1 |
:10014000753400340A108A100A1182076F346E3435 |
:10015000743469346D3465343D3425346C3475340D |
:100160003A342534303432346434203400340A10C4 |
:100170008A100A11820731346D3469346E340034C8 |
:100180000A108A100A1182070D340A346534733458 |
:1001900063342034203420346334723420342034E7 |
:1001A0002034203472346F346C346C340D340034A9 |
:1001B0000A108A100A11DF3E03188A0A82000D34E1 |
:1001C000253464343A3425343034323464342034C1 |
:1001D0002034253464342E34253464342E342534CC |
:1001E0003034323464340A346D3465346E347534EA |
:1001F000203420346F346634663420342034733431 |
:10020000743461347234743400340A148A100A115C |
:1002100082070C345334543441345234543420342F |
:100220004834563420343434303430345634003486 |
:100230000A148A100A1182076C346F346734203430 |
:100240007E342034723473343234333432340034F4 |
:100250000A148A100A1182076C346F346734203410 |
:100260007E34203465346534703472346F346D34C8 |
:10027000203431346D3400340A148A100A11820794 |
:100280006C346F34673420347E3420346534653404 |
:10029000703472346F346D342034253475346D34D9 |
:1002A00000340A148A100A1182074F344634463447 |
:1002B000203428347334743461346E34643420341C |
:1002C00062347934293400340A148A100A118207FE |
:1002D0006534633468346F34203420346F346E34C2 |
:1002E00000340A148A100A118207653463346834B2 |
:1002F0006F34203420346F346634663400340A148A |
:100300008A100A118207733465346E3464342034E1 |
:100310006C346F34673420347E3420347234733458 |
:1003200032343334323400340A148A100A1182070A |
:100330006534723461347334653420346534653423 |
:10034000703472346F346D34203425343334753462 |
:1003500000340A148A100A118207533454344F347B |
:10036000503420342634203463346C3465346134A2 |
:10037000723400340A148A100A118207623461341C |
:100380007434743465347234693465342034003420 |
:100390000A148A100A11820763346F346E3474347D |
:1003A00072346134733474343A3420342534643410 |
:1003B0000A3420342D342B3472346F346C346C3462 |
:1003C00000340A148A100A1182070D347434693417 |
:1003D0006D34653420342534323464343A34253471 |
:1003E0003034323464340A3468346F3464346D34F5 |
:1003F00069346E3472346F346C346C3400340A10E7 |
:100400008A140A1182070D346434613474346534FB |
:1004100020342534323464342E34253430343234AC |
:1004200064342E3425343034323464340A34643441 |
:10043000613479346D346F346E3472346F346C34AB |
:100440006C3400340A108A140A1182070A340D34FD |
:10045000253464343A34253430343234643420342E |
:100460002534323464342F34253430343234643417 |
:100470002F342534303432346434203464346934D5 |
:1004800066343D3425346C34753400340A108A14D3 |
:100490000A1182070C346334683472347234723453 |
:1004A00000340A108A140A1182070C346C346F3439 |
:1004B0007734203462346134743474340034AB08DB |
:1004C000031D6D2A0608FF3A7039AA00FF30AB0001 |
:1004D000AC08031D6D2A2A08AC002B0F702A712A64 |
:1004E000AB03AD08031D772AAE0803197B2A2D083C |
:1004F0000319AE03AD03D508031DD5033619842AAD |
:100500008101D301D401EF2ADD080319892A0230C1 |
:10051000DD000108C900D30A4A0849020319CC2AA0 |
:100520004A0849020318B22A4A08003C8316D1003F |
:100530000130D2000030031C0130D202831249087E |
:10054000831651078312CA00C10700300318013017 |
:10055000C207003003180130C30700300318013010 |
:10056000C407C22A4A084902CA00C107003003185A |
:100570000130C207003003180130C30700300318F0 |
:100580000130C4074A08DE004908CA00580BCB2ACC |
:10059000D9080319B614CD2ADE015308193C031DEE |
:1005A000EF2AD301D40A580BD92A5908053C03195C |
:1005B000B61454083C3C031DEF2AD4010130C50792 |
:1005C0000318C60A0319C70A0319C80A36144408CF |
:1005D000D2004308D1004208D0004108CF008C105F |
:1005E0008A110A1229280608FF3A70398316D100A9 |
:1005F00083122A08831651020319062B0130831235 |
:10060000AB00831651088312AA008316133083129D |
:10061000E4000B108A110A1229288316530852028B |
:100620000318152B5208F800182B53085202F80033 |
:1006300083120034B30A01303402F43E0318562BFF |
:100640000C3E572B33081F3C03183A2B0130B300E4 |
:10065000B40A34080D3C031D3A2B0130B4003508B0 |
:10066000B50A8316D100D2006430D30083120D2363 |
:100670007808B500562B33081E3C0318422B013076 |
:10068000B300B40A562B33081D3C03184B2B013022 |
:10069000B300B40A562B33081D3C031D562B3508F6 |
:1006A00003390319562B0130B300B40A00340A147D |
:1006B0008A140A118207222B432B222B3B2B222B3D |
:1006C0003B2B222B222B3B2B222B3B2B222B103084 |
:1006D000B00730083B3C0318882BB10A300883165A |
:1006E000D2003C30D30083120D237808B0003108CB |
:1006F0003B3C03187D2BB20AB10131080F390F3C86 |
:10070000031936173208173C0318882BB2011A2335 |
:10071000B614E408031DE4030C108A110A122928F8 |
:100720008316811383120608AA00AA01FF30AB00CA |
:10073000AC018A150A165028A73084000008031956 |
:10074000B02B0130F800F701F70BA42BF80BA32B0B |
:100750004A30F700F70BAA2B00000000800BA12BFA |
:10076000003483162D18B82B83128611BA2B8316EA |
:100770008312861583168611AD18C22B83120611BB |
:10078000C42B831683120615831606112D19CC2B44 |
:1007900083128610CE2B831683128614831686103E |
:1007A000AD19D62B83120610D82B8316831206148C |
:1007B0008316061083128617831686130000831291 |
:1007C000861383168613831200348316AB08031D29 |
:1007D000ED2B83128713EF2B831683128717A91330 |
:1007E000290883168700AC0E2C08AD008312B123B4 |
:1007F0008316AC0E2C08AD008312B1230D30F70028 |
:10080000F70B002C0034C8308316A70083129C23FA |
:100810008713A9132908831687008312861383166A |
:1008200086138312EA016A08023C031C232C02305F |
:100830008316A70083129C2303308316AD00831216 |
:10084000B123EA0A132C0D30F700F70B252C0230E8 |
:100850008316AD008312B1230D30F700F70B2E2C59 |
:10086000EA016A08023C031C472C6A084520EB0099 |
:100870008316AB0183126B088316AC008312E52349 |
:1008800002308316A70083129C23EA0A312C00341D |
:10089000013083162702A9002808023C031D522CB0 |
:1008A0004030A90729088038AA00AB012A08AC000B |
:1008B0008312E5230034831626080C3A83120319A9 |
:1008C000682C063A0319742C073A03197C2C832CE4 |
:1008D0008316AB010130AC008312E523023083168E |
:1008E000A70083129C23912C01308316A7000230AD |
:1008F000A80083124824912C01308316A700A80079 |
:1009000083124824912C831626081F3C031C8A2C32 |
:100910000730A6050130AB002608AC008312E523A2 |
:10092000912C0034EE016E084D20003803199E2CE6 |
:10093000EE0A8316A60083125B24932C00348316E0 |
:100940002508F80124020318A82C2408F700B42C69 |
:10095000F7010830A600A40DF70D2508770203184B |
:10096000F700F80DA60BAB2C831200342030701E5C |
:100970003030F1006F08F700EF1FC52CF709F70AB8 |
:100980007708EF002D30F100F0176F088316A400F0 |
:100990006430A50083129F247708EF003030780779 |
:1009A000F2006F088316A4000A30A50083129F246A |
:1009B00030307707F40030307807F3007108F70023 |
:1009C000F01DE42CF01F7011701AF12CF01F0C2D8B |
:1009D00070190C2D7708F200F0180C2D7708F30031 |
:1009E0000C2D30307202031D0C2D7708F2002030E0 |
:1009F000F100F01DFF2C7011F014F01FF0103030DA |
:100A00007302031D0C2D7708F3002030F200F01D57 |
:100A1000FF2CF010F01F7010701D132D710883163D |
:100A2000A60083125B24F01C1A2D72088316A60000 |
:100A300083125B24701C212D73088316A600831279 |
:100A40005B2474088316A60083125B240034040818 |
:100A5000F600700EF038F200F207E23EF300323E8C |
:100A6000F50070080F39F307F307F507E93EF400C6 |
:100A7000F407F4076F0E0F39F407F507F40DF50DC1 |
:100A8000F509F50D6F080F39F507F20D0730F10084 |
:100A90000A30F507F403031C492DF407F303031C84 |
:100AA0004D2DF307F203031C512DF207F103031C34 |
:100AB000552D713084000730760576138407753024 |
:100AC0000402031976170008F700031D6F2D761B2B |
:100AD0006F2D761A7D2DF6196F2D2030722DF6159B |
:100AE00076123030F707F0010408EF00770883161C |
:100AF000A60083125B246F088400840A761F5F2D92 |
:100B00000034780870088316A4006430A5008312AE |
:100B10009F247708F00078083030031D962DF11CD3 |
:100B20009F2DF1199F2D711A2030992DF1117112FD |
:100B30007114F80778088316A60083125B247008E6 |
:100B40008316A4000A30A50083129F247708F000C2 |
:100B500078083030031DB22DF119B82D711CB82D55 |
:100B6000711A2030F80778088316A60083125B24D8 |
:100B70003030F00770088316A60083125B2400341F |
:100B8000F701F801F901FA018316AE01AF01B001D6 |
:100B9000B1012D082C042B042A040319FF2D203049 |
:100BA000B2000310A60DA70DA80DA90DAE0DAF0D37 |
:100BB000B00DB10D2D083102031DE82D2C083002B7 |
:100BC000031DE82D2B082F02031DE82D2A082E02F5 |
:100BD000031CF92D2A08AE022B08031C2B0FAF02B1 |
:100BE0002C08031C2C0FB0022D08031C2D0FB10282 |
:100BF0000314F70DF80DF90DFA0DB20BD12D00000D |
:100C0000AE3084008312003404088316A0003B3009 |
:100C1000A5009A30A400CA30A300A2010A30A100A6 |
:100C20007208A9007108A8007008A70083126F0855 |
:100C30008316A6002508AD002408AC002308AB00ED |
:100C40002208AA008312C0250008EF00840A0008C9 |
:100C5000F000840A0008F100840A0008F200FD3068 |
:100C60008407F708031D4B2E83162108013A031D44 |
:100C70003B2E83124B2E200803194D2E0F392102D3 |
:100C80000319442E0318542EA01B542E201B4D2E46 |
:100C900020304E2E83128316A0013030F7077708DC |
:100CA000A60083125B2483162508A9002408A80047 |
:100CB0002308A7002208A600AD01AC01AB010A3051 |
:100CC000AA008312C0257A088316A5007908A4001B |
:100CD0007808A3007708A200A10B102E831200341D |
:100CE0000B088316A70083128B1329132908831678 |
:100CF0008700831207130830F8000000000000008E |
:100D0000F817932EF8138316A60C831203180717EF |
:100D1000031C07137817932E7813F80B832E00000B |
:100D20000000000007171C308400840B952E000083 |
:100D30000000F81B822E781B8C2E8316A71FA32E73 |
:100D400083128B178316831200342030741E3030C8 |
:100D50008316A0007308F700F31FB52EF709F70AF2 |
:100D60007708F3002D30A000F4177308A400643056 |
:100D7000A50083129F247708F3003030780783168C |
:100D8000A1007308A4000A30A50083129F2430300C |
:100D900077078316A30030307807A2002008F700F9 |
:100DA000F41DD42EF41F7411741AE12EF41FFC2EBE |
:100DB0007419FC2E7708A100F418FC2E7708A20005 |
:100DC000FC2E30302102031DFC2E7708A1002030BC |
:100DD000A000F41DEF2E7411F414F41FF410303041 |
:100DE0002202031DFC2E7708A2002030A100F41D72 |
:100DF000EF2EF410F41F7410741D032F2008A600AA |
:100E0000831270268316F41C0A2F2108A600831271 |
:100E100070268316741C112F2208A60083127026D8 |
:100E200083162308A60083127026003478087208FF |
:100E30008316A4006430A50083129F247708F20073 |
:100E400078083030031D2B2FF31C342FF319342F67 |
:100E5000731A20302E2FF31173127314F8077808C9 |
:100E60008316A6008312702672088316A4000A3027 |
:100E7000A50083129F247708F20078083030031D04 |
:100E8000472FF3194D2F731C4D2F731A2030F8077D |
:100E900078088316A600831270263030F207720895 |
:100EA0008316A600831270268A110A16042B0408E2 |
:100EB0008316A500720EF038A100A107E23EA20041 |
:100EC000323EA40072080F39A207A207A407E93E28 |
:100ED000A300A307A307710E0F39A307A407A30D4F |
:100EE000A40DA409A40D71080F39A407A10D0730A2 |
:100EF000A0000A30A407A303031C7A2FA307A203B0 |
:100F0000031C7E2FA207A103031C822FA107A003AD |
:100F1000031C862FA0308400073025052513840785 |
:100F2000A4300402031925170008F700031DA02FA1 |
:100F3000251BA02F251AAE2FA519A02F2030A32FD7 |
:100F4000A51525123030F707F2010408F1007708E3 |
:100F5000A60083127026710884008316840A251F58 |
:100F6000902F831200348E30F7006E08F8006D0861 |
:100F7000F900FA01F808031DC72F7908F800F901F4 |
:100F80000830F702F808031DC72FF701CF2F031011 |
:100F9000F81BCE2FF90DF80DF703C72FF81300003B |
:100FA0008A110A16DE2B83162608B63CA600FA0123 |
:100FB0002708AA00A7170310A70CA80CA90CFA0C65 |
:100FC000F90CF80CF70CA60BDB2FAA1FF22FF70970 |
:100FD000F809F909FA09F70A0319F80A0319F90ACD |
:100FE0000319FA0A83128A150A12FE2C2C08EA0049 |
:0C0FF000EA08031DAC016A08F800003498 |
:101000006D08403A03190B28603A03191228303A48 |
:101010000319C228D5280230D800B6148A119224A8 |
:101020008A15182A361E16283612C1283616DB08ED |
:101030000319C1285C08053C03182E2804305C0203 |
:10104000EF0003178D0083168C130C1483120C0809 |
:101050000313EE00EE1F2E280430DC025C08F93C7E |
:10106000031834283612C128DA013208EE00EE17D0 |
:101070005C08DC0AEF0003178D0003136E080317EA |
:101080008C0083168C130C15831203130B08F700C6 |
:101090008B138316031755308D00AA308D008C14E6 |
:1010A0008C1850280C117708831203138B04310815 |
:1010B000EE005B18EE175C08DC0AEF0003178D00EA |
:1010C00003136E0803178C0083168C130C15831200 |
:1010D00003130B08F7008B138316031755308D008D |
:1010E000AA308D008C148C1873280C117708831289 |
:1010F00003138B045C08DC0AEF0003178D00031355 |
:10110000330803178C0083168C130C1583120313FA |
:101110000B08F7008B138316031755308D00AA3088 |
:101120008D008C148C1892280C11770883120313ED |
:101130008B0407303502F700F70EF030F70577081B |
:101140003404EE005C08DC0AEF0003178D00031383 |
:101150006E0803178C0083168C130C15831203136F |
:101160000B08F7008B138316031755308D00AA3038 |
:101170008D008C148C18BA280C1177088312031375 |
:101180008B04D528D90AA8018B1BA8178B135908E3 |
:101190008316D2000630D3008A1183120D238A15DC |
:1011A000A81B8B177808D900D528EE016E088A1184 |
:1011B00053208A15EE0AF7008316A6008A118312BF |
:1011C0005B248A1505306E02031DD628103084007A |
:1011D0004008F0003F08EF008A1127258A150330E8 |
:1011E000EF0020308316A6008A1183125B248A1533 |
:1011F000EF0BF1280B308316A7000130A8008A11ED |
:10120000831248248A15361E1629EE016E088A11AB |
:1012100060208A15003803191529EE0A8316A600E6 |
:101220008A1183125B248A1506292629EE016E088D |
:101230008A1166208A15003803192629EE0A8316BA |
:10124000A6008A1183125B248A15172939083A04EB |
:1012500003193A29EE016E088A116C208A150038AC |
:1012600003193A29EE0A8316A6008A1183125B2419 |
:101270008A152B290E308316A7000130A8008A1189 |
:10128000831248248A155C08FF3CF7000310770C92 |
:10129000EF00F0001330F1008A1181258A150A3021 |
:1012A0008316A6008A1183125B248A155908FA3E18 |
:1012B0000318182A063E1B2A6E308316A6008A11D0 |
:1012C00083125B248A153D308316A6008A1183128F |
:1012D0005B248A15413084004408F2004308F10081 |
:1012E0004208F0004108EF008A1104268A15182AE6 |
:1012F000EE016E088A1172208A15EE0AF700831635 |
:10130000A6008A1183125B248A1504306E02031D25 |
:101310007929103084003C08F0003B08EF008A1166 |
:1013200027258A15182AEE016E088A117E208A1553 |
:10133000EE0AF7008316A6008A1183125B248A1531 |
:1013400004306E02031D9429103084003E08F00022 |
:101350003D08EF008A1127258A15182AEE016E082C |
:101360008A118A208A15EE0AF7008316A6008A11D0 |
:1013700083125B248A1504306E02031DAF291030DE |
:1013800084003808F0003708EF008A1127258A15F5 |
:10139000182AEE016E088A1196208A15EE0AF700C7 |
:1013A0008316A6008A1183125B248A1504306E020C |
:1013B000031DCA29103084003A08F0003908EF00F4 |
:1013C0008A1127258A15182AEE016E088A11A22093 |
:1013D0008A15EE0AF7008316A6008A1183125B2491 |
:1013E0008A1507306E02031DE52941308400480844 |
:1013F000F2004708F1004608F0004508EF008A11A6 |
:1014000004268A153A308316A6008A1183125B24BB |
:101410008A155408EF000130F0008A11B6248A15AD |
:1014200020308316A6008A1183125B248A15182A9D |
:101430008A110A16362E0A108A140A1182075C29AC |
:1014400078299329AE29C929E4296D080319FD2AB1 |
:101450008316A4007108031D2F2A8312FD2AA402FB |
:10146000031C392A7F30A407031C382A8312FD2A63 |
:10147000432A8130A40203183F2A8312FD2A031D48 |
:10148000432A8312FD2A2408F700F801F901FA0122 |
:10149000A30183126E088316A200A21783126F089D |
:1014A0008316A1007008A0001930A4007408A002DF |
:1014B00003186A2A0130A10203186A2AA20203183B |
:1014C0006A2AA30203186A2AA30AA20AA10A7408B4 |
:1014D000A0079C2A7308A1020318852A0130A202E2 |
:1014E0000318852AA3020318852AA30AA20A7308EF |
:1014F000A1077408A007031C9C2AA10A031D9C2AAB |
:10150000A20A031D9C2AA30A9C2A72088038A20200 |
:1015100003189B2A0130A30203189B2AA30A72080E |
:101520008038A2077308A107031C792AA20A031DA9 |
:10153000792AA30A792A7A14A40B9F2AAA2A0310CB |
:10154000A00DA10DA20DA30D0310FA0DF90DF80DBC |
:10155000A50D562A251CB22A0310F80CF90CFA0C1A |
:10156000A50CB62AF70BB62A8312FD2AA51BDF2A83 |
:101570000310A00DA10DA20DA30D7408A002031865 |
:10158000CB2A0130A1020318CB2AA2020318CB2ACE |
:10159000A302031CF02A7308A1020318D62A013003 |
:1015A000A2020318D62AA302031CF02A720880386C |
:1015B000A2020318DF2A0130A302031CF02AFA0A50 |
:1015C000031DF02AF90A031DF02AF80A031DF02A68 |
:1015D000F70A031DED2A8312FD2AF80CF90CFA0C08 |
:1015E00083126E088316A4007208A406A41FFA2AA8 |
:1015F000F817022BF813022B8312F701F801F901F7 |
:10160000FA018316000083128A110A16F72B83163B |
:1016100026080319782BAE002A080319782BAE0789 |
:101620000318192B7F30AE02031C782B0319782B7B |
:101630001D2B8130AE070318782B2E08F700F80118 |
:10164000F901FA012708B200B2172808B1002908E9 |
:10165000B0001830AE00AF01301C462B2D08FA0741 |
:10166000031C382BF90A031D382BF80A0319AF178E |
:101670002C08F907031C3F2BF80A0319AF172B0896 |
:10168000A800A8172808F8070318AF17AF0DF80C23 |
:10169000F90CFA0CB20CB10CB00C0310AE0B2B2BE6 |
:1016A0000130F7070318782BF81B5D2BB20DFA0DEC |
:1016B000F90DF80DF7030319782BB21F6E2BFA0AF8 |
:1016C000031D6E2BF90A031D6E2BF80A031D6E2BEA |
:1016D000F80CF90CFA0CF70A0319782B2708AF005D |
:1016E0002B08AF06AF1F762BF8177C2BF8137C2B3B |
:1016F000F701F801F901FA0100008312003480308B |
:10170000831C852B8316A50683128316AA01AB01C1 |
:101710002108A9002508A90620080319702CA80093 |
:10172000F70024080319792CA8020319162C031CAE |
:10173000D52B2508AE00AE172608AD002708AC0053 |
:10174000AB010310AE0CAD0CAC0CAB0CA80BA02B7A |
:10175000A91FAD2B2A148D2C2A1028102A16A3306D |
:101760008400A22C2A12A91BBF2B281CCA2BAE0C4A |
:10177000AD0CAC0CAB0CF70A0319882CCA2BAE1BB2 |
:10178000CD2B0310AB0DAC0DAD0DAE0DF703031952 |
:10179000882CBF2B2A17352C2A132108A900A11F3A |
:1017A000D32BAE17812CAE13812C2408A800F70090 |
:1017B0002008A8022108AE00AE172208AD002308B9 |
:1017C000AC00AB010310AE0CAD0CAC0CAB0CA80B19 |
:1017D000E12BA91FEE2BAA148D2CAA102810AA16F3 |
:1017E000A7308400A22CAA12A91B002C281C0B2CA9 |
:1017F000AE0CAD0CAC0CAB0CF70A0319882C0B2CFF |
:10180000AE1B0E2C0310AB0DAC0DAD0DAE0DF703E2 |
:101810000319882C002CAA17352CAA132508A90017 |
:10182000A51F142CAE17812CAE13812C2508AE00F9 |
:10183000AE172608AD002708AC00A91F232CAE1355 |
:101840002A158D2C2A11AB012810A3308400A22C5C |
:10185000A91B4B2C2108A900281C352CAE0CAD0C63 |
:10186000AC0CAB0CF70A0319882CAB1F462CAC0A46 |
:10187000031D462CAD0A031D462CAE0A031D462C43 |
:10188000AE0CAD0CAC0CF70A0319882C2A1BCC2B20 |
:10189000AA1B0D2C6A2C8030AE06AE1F532C8D2C4B |
:1018A0002508A900602C2108A900AE08031D602CA2 |
:1018B000AD08031D602CAC08031D602CF701812CC2 |
:1018C000AE1B6A2C0310AB0DAC0DAD0DAE0DF70BBE |
:1018D000602C882CA91F6E2CAE17812CAE13812C86 |
:1018E0002408F7002508AE002608AD002708AC0044 |
:1018F000812C2008F7002108AE002208AD00230843 |
:10190000AC002E08F8002D08F9002C08FA00C02CB5 |
:10191000F701F801F901FA01C02CAB01AC09AD09DE |
:10192000AE09AB09AB0A031D9B2CAC0A031D9B2C13 |
:10193000AD0A0319AE0A2A18AC2BAA18ED2B2A19E6 |
:10194000222C502C0008AC07031CAC2CAD0A031D44 |
:10195000AC2CAE0A0319281484030008AD07031C3D |
:10196000B42CAE0A0319281484030008801F803A9F |
:10197000AE07031828142A1AB22BAA1AF32B282C04 |
:10198000000083128A110A16392C04088316A0005D |
:101990007108A1000319ED2C7008A90083126F08CB |
:1019A0008316A80083126E088316A70083126D08A1 |
:1019B0008316A600AD01AC012030AB008230AA0036 |
:1019C000831207237A08F0007908EF007808EE0008 |
:1019D0007708ED008316A10BCC2C7008A9008312A8 |
:1019E0006F088316A80083126E088316A70083125F |
:1019F0006D088316A6008A118312D32F8A157A08E0 |
:101A0000F0007908EF007808EE007708ED00F01F8D |
:101A1000182D8316A003A0168312ED09EE09EF0915 |
:101A2000F009ED0A0319EE0A0319EF0A0319F00A87 |
:101A30003B308316A5009A30A400CA30A300A2014F |
:101A40000A30A10071080319A00A7008A9008312C6 |
:101A50006F088316A80083126E088316A7008312EE |
:101A60006D088316A6002508AD002408AC002308E5 |
:101A7000AB002208AA008A118312C0258A1500082B |
:101A8000ED00840A0008EE00840A0008EF00840AD2 |
:101A90000008F000FD308407F708031D662D710A69 |
:101AA00083162102031D562D8312662D200803196B |
:101AB000692D0F39210203195F2D0318A92DA01BD1 |
:101AC000A92D201B692D2030A12D831220308316D3 |
:101AD000A005A01E7B2DA0127108031DA00377088E |
:101AE000A0002D30A6008A1183125B248A1583166C |
:101AF0002008F700A00171082102031D8D2D770831 |
:101B0000A0002E30A6008A1183125B248A1583164A |
:101B10002008F7002030A00500303030A01EA12D95 |
:101B2000A0127108031DA0037708A0002D30A600A5 |
:101B30008A1183125B248A1583162008F700A001FE |
:101B40003030F7077708A6008A1183125B248A15C4 |
:101B500083162508A9002408A8002308A700220846 |
:101B6000A600AD01AC01AB010A30AA008A118312B4 |
:101B7000C0258A157A088316A5007908A40078087C |
:101B8000A3007708A200A10B252D83128A110A1643 |
:101B9000572C361C442F4B084F02BF005008C00082 |
:101BA0004C08031C4C0FC0025208CE005108CD0057 |
:101BB0005008CC004F08CB0052088316A9008312AE |
:101BC00051088316A800831250088316A7008312B9 |
:101BD0004F088316A600831248088316AD008312AF |
:101BE00047088316AC00831246088316AB008312A5 |
:101BF00045088316AA008A118312C0258A15780821 |
:101C0000B8007708B7003E084002031C112E031DE0 |
:101C10000D2E3F083D020318112E4008BE003F085C |
:101C2000BD0040083C02031C1F2E031D1B2E3B0859 |
:101C30003F0203181F2E4008BC003F08BB004508A8 |
:101C4000053C031D482EC608031D482EC708031D6A |
:101C5000482EC808031D482E52088316A900831277 |
:101C600051088316A800831250088316A700831218 |
:101C70004F088316A600AD01AC01AB010530AA00E8 |
:101C80008A118312C0258A157808BA007708B9002E |
:101C90003610B614361E442F5B080319562E023A2E |
:101CA0000319BF2E033A0319C22E322F0A308316AE |
:101CB000A6008A11831270268A150D308316A6009D |
:101CC0008A11831270268A153208F3001F30F4003F |
:101CD0008A11A5268A153A308316A6008A11831226 |
:101CE00070268A153108F3000130F4008A11A52608 |
:101CF0008A1520308316A6008A11831270268A1551 |
:101D00003308F3001130F4008A11A5268A152F300C |
:101D10008316A6008A11831270268A153408F300F0 |
:101D20000130F4008A11A5268A152F308316A600EB |
:101D30008A11831270268A153508F3000130F400E9 |
:101D40008A11A5268A151730EB006B088A1122220A |
:101D50008A15EB0AF7008316A6008A1183127026F3 |
:101D60008A151C306B02031DA52E1030840040081C |
:101D7000F2003F08F1008A1157278A15322FDA083E |
:101D8000031D322F3F30EA00EA0A6A0884008013FC |
:101D90005C08DC0AEB006A0884000008EC006B08B1 |
:101DA00003178D0003136C0803178C0083168C1324 |
:101DB0000C15831203130B08F7008B1383160317FC |
:101DC00055308D00AA308D008C148C18E52E0C1126 |
:101DD0007708831203138B045C08DC0AEB00EA0328 |
:101DE0006A0884000008EC006B0803178D000313D9 |
:101DF0006C0803178C0083168C130C1583120313C5 |
:101E00000B08F7008B138316031755308D00AA308B |
:101E10008D008C148C180A2F0C1177088312031371 |
:101E20008B0403178D0103135C0803178C008316C2 |
:101E30008C130C15831203130B08F7008B138316F6 |
:101E4000031755308D00AA308D008C148C18262F66 |
:101E50000C117708831203138B045C08FD3C031CF0 |
:101E60003612322FDA0AA8018B1BA8178B135A08D7 |
:101E70008316D2001E30D3008A1183120D238A15D7 |
:101E8000A81B8B177808DA008A150A167428F8013F |
:101E9000F901F701FA017108031D512F70080319A8 |
:101EA0006B2F1030F2000310EE0DEF0DF70DFA0D51 |
:101EB00071087A02031D5E2F70087702031C672FDA |
:101EC0007008F702031CFA037108FA020314F80DF4 |
:101ED000F90DF20B532F00008A110A16962E2B0FC4 |
:101EE000722F762F0030F800792F792F2A08F8000A |
:101EF000792F00341230EE02031C8C2F6E308400D8 |
:101F0000FC3080050310800C800C000803198C2F16 |
:0E1F10008A2F0000800B892F8A110A16CA2E14 |
:10200000EA08031906280A1292240A16D701B61004 |
:102010005808013C03183F286A08103C031D172884 |
:10202000D80A58080B3C031817280230D800580863 |
:102030000A3C03193F285808063C03193F28580852 |
:102040000B3C03193F286A08403C031D2F28361D0E |
:102050002C280130D8002D28D801EA013F28ED01B5 |
:102060006D080A12C0200A16003803193F28ED0A2D |
:102070008316A6000A1283125B240A163028580819 |
:10208000F43E0318362E0C3E392EFF30BC00BB0048 |
:10209000BA01B9013A08B8003908B7003808C000D9 |
:1020A0003708BF00C801C7014008C6003F08C50087 |
:1020B000C900CA00CE01CD01CC014A08CB004E08B0 |
:1020C000D2004D08D1004C08D0004B08CF00520878 |
:1020D000C4005108C3005008C2004F08C1004208A4 |
:1020E000BE004108BD00DD0136125D183616361AF5 |
:1020F0007B2836117C28361536198028B6118128A0 |
:10210000B615B619852836108628361436170130CC |
:1021100003178D0083168C130C1483120C08031301 |
:10212000DB0003178D0183168C130C1483120C082B |
:102130000313DC0083168511831285150D30831679 |
:10214000A6000A1283125B240A163208EF001F3021 |
:10215000F0000A12B6240A163A308316A6000A12B4 |
:1021600083125B240A163108EF000130F0000A12D6 |
:10217000B6240A1620308316A6000A1283125B24A6 |
:102180000A1620308316A6000A1283125B240A1650 |
:102190003308EF001F30F0000A12B6240A162E3062 |
:1021A0008316A6000A1283125B240A163408EF0075 |
:1021B0001F30F0000A12B6240A162E308316A6002D |
:1021C0000A1283125B240A163508EF000130F00072 |
:1021D0000A12B6240A160330ED0020308316A6003A |
:1021E0000A1283125B240A16ED0BED281430EE0060 |
:1021F0006E080A12D8200A16EE0AF7008316A60007 |
:102200000A1283125B240A1625306E02031DF82879 |
:102210006A08403A03191329603A03191629303A1B |
:1022200003191B293F290230D8003F29D901590839 |
:10223000D800B6153F290130D800D9018316851181 |
:1022400083128511ED016D080A1205210A16003866 |
:1022500003193229ED0A8316A6000A1283125B24A1 |
:102260000A1623290830ED00FA308316A7000A1257 |
:1022700083129C230A16ED0B342936153F29EA08F0 |
:1022800003194629B6140A1292240A16362E6A0831 |
:10229000ED000A128A1500280A168A116A08203CE5 |
:1022A000031D8229DB0AA8018B1BA8178B135B086F |
:1022B0008316D2000330D3000A1283120D230A16AC |
:1022C000A81B8B177808DB00013003178D00031360 |
:1022D0005B0803178C0083168C130C1583120313F1 |
:1022E0000B08F7008B138316031755308D00AA30A7 |
:1022F0008D008C148C187A290C1177088312031323 |
:102300008B0436125B0803198C29013A03199D29A5 |
:10231000033A0319AE29D029ED016D080A121821DC |
:102320000A16003803199C29ED0A8316A6000A1222 |
:1023300083125B240A168D29D029ED016D080A123B |
:1023400028210A1600380319AD29ED0A8316A600C4 |
:102350000A1283125B240A169E29D0291E30EB0034 |
:10236000ED016D080A123C210A16ED0AF7008316EA |
:10237000A6000A1283125B240A160D306D02031D9B |
:10238000B1296B08F0001B30F1000A1281250A16F2 |
:102390006D308316A6000A1283125B240A16D02918 |
:1023A000362EED016D080A1251210A160038031964 |
:1023B000E129ED0A8316A6000A1283125B240A168D |
:1023C000D2296A08203C031DED29D9015908D800FB |
:1023D000B6158316851183128515362E6A08203CA2 |
:1023E000031DF929DD080319F729DD01F929013059 |
:1023F000DD00DD0803190D2AED016D080A126421C4 |
:102400000A16003803190C2AED0A8316A6000A12D0 |
:1024100083125B240A16FD291D2AED016D080A129C |
:1024200071210A16003803191D2AED0A8316A60029 |
:102430000A1283125B240A160E2A362E6A08203CE2 |
:10244000031D462B0230ED005C086D020318462B7D |
:102450006E30F000700884006D08ED0AF20003177A |
:102460008D0083168C130C1483120C0880007008E6 |
:1024700084000008F100F11F1C2B700884008013F9 |
:10248000700884000008F1000D3083160313A600C5 |
:102490000A12831270260A160A308316A6000A1240 |
:1024A000831270260A167108F3001F30F4000A1216 |
:1024B000A5260A163A308316A6000A128312702641 |
:1024C0000A16700884006D08ED0AF20003178D00EB |
:1024D00083168C130C1483120C088000700884007F |
:1024E00000083F39F100F3000130F4000A12031331 |
:1024F000A5260A1620308316A6000A12831270261B |
:102500000A16F00A700884006D08ED0AF20003173D |
:102510008D0083168C130C1483120C088000700835 |
:1025200084000008F100F3001F30F4000A120313C6 |
:10253000A5260A162F308316A6000A1283127026CB |
:102540000A16700884006D08ED0AF20003178D006A |
:1025500083168C130C1483120C08800070088400FE |
:1025600000080F39F200F3000130F4000A120313DF |
:10257000A5260A162F308316A6000A12831270268B |
:102580000A1670088400000EF7000F30F705770870 |
:10259000073EF4007008840074088000700884000E |
:1025A0000008F100F3000130F4000A12A5260A1613 |
:1025B00020308316A6000A12831270260A16F00332 |
:1025C000700884000008F100F11FF72AF10171087A |
:1025D0000A12B7200A1600380319F62AF10A8316E0 |
:1025E000A6000A12831270260A16E72A1A2B700810 |
:1025F00084001E308000700884000008F100F200A2 |
:102600001B30F3000A12162F0A166D308316A6002F |
:102610000A12831270260A1669308316A6000A125F |
:10262000831270260A166E308316A6000A128312D1 |
:1026300070260A16452B031703136E08EF00EE01F0 |
:10264000700884006D08ED0AF20003178D008316F0 |
:102650008C130C1483120C0880000D3083160313A6 |
:10266000A6000A12831270260A160A308316A600E4 |
:102670000A12831270260A16103084006F08F200C6 |
:102680006E08F1000A1257270A16242AED016D0878 |
:102690000A127F210A1600380319562BED0A8316F9 |
:1026A000A6000A1283125B240A16472B362E6A08EC |
:1026B000203C031D772B36120230DC0003178D01FE |
:1026C0008C0083168C130C15831203130B08F70070 |
:1026D0008B138316031755308D00AA308D008C1490 |
:1026E0008C18702B0C117708831203138B045C0871 |
:1026F000FF3CF7000310770CEE00EF016F080A12A1 |
:1027000094210A16EF0AF7008316A6000A12831214 |
:102710005B240A160D306F02031D7E2B6E08F0003D |
:102720001330F1000A1281250A16362EED016D08CC |
:102730000A12A9210A1600380319A62BED0A8316DE |
:10274000A6000A1283125B240A16972B6A08203C03 |
:10275000031DAD2BD801D901B614362EED016D083D |
:102760000A12BA210A1600380319BE2BED0A831685 |
:10277000A6000A1283125B240A16AF2B6A08203CBB |
:102780000319C42B361D602C3619D12B83168511E5 |
:10279000831285111E308316A7000A1283129C2310 |
:1027A0000A161F151F19D22B1E08FA0083161E08C1 |
:1027B0008312ED001E08EE000A12B32F0A167A08E3 |
:1027C000E8007908E7007808E6007708E500F001FE |
:1027D000EF01EE018930ED006808F4006708F300AE |
:1027E0006608F2006508F1000A128A15252A0A1601 |
:1027F0008A117708ED007808EE007908EF007A0872 |
:10280000F0008316A90083126F088316A8008312B4 |
:102810006E088316A70083126D088316A600AD010B |
:10282000AC014030AB007F30AA000A128A15831237 |
:1028300007230A168A117708F1007808F200790850 |
:10284000F3007A08F400831074088316A300730859 |
:10285000A2007208A1007108A000EC30A70051305E |
:10286000A6003830A5007C30A4000A128A15831215 |
:102870007F2B0A168A117A08E8007908E7007808A1 |
:10288000E6007708E5003619482C83168515831273 |
:10289000893084006808F0006708EF006608EE00E1 |
:1028A0006508ED000230F1000A128A15C52C0A16DF |
:1028B0008A1156308316A6000A1283125B240A1668 |
:1028C000362E6A08203C031D6A2CE30A63080A3C82 |
:1028D000031CE3036A08403C031D732CE3036308F5 |
:1028E000013C0318E30A63089500ED016D080A1224 |
:1028F000C8210A16ED0AF7008316A6000A128312F1 |
:102900005B240A160A306D02031D762C6308EF0063 |
:102910001F30F0000A12B6240A160A308316A600E9 |
:102920000A1283125B240A1620308316A6000A12AC |
:1029300083125B240A162D308316A6000A12831216 |
:102940005B240A160530EE0020308316A6000A121A |
:1029500083125B240A16EE0BA42C2B308316A600E0 |
:102960000A1283125B240A160430EF00203083160B |
:10297000A6000A1283125B240A16EF0BB62C103045 |
:10298000F00070080A12C8210A16F00AF700831630 |
:10299000A6000A1283125B240A1614307002031D6B |
:1029A000C12C362E6A08203C031DEB2C8F018E01B2 |
:1029B000B001B10AA8018B1BA8178B13310883162D |
:1029C000D2003C30D3000A1283120D230A16A81B32 |
:1029D0008B177808B1006A08403C031D012DB20A2C |
:1029E000A8018B1BA8178B1332088316D20018304E |
:1029F000D3000A1283120D230A16A81B8B1778081E |
:102A0000B200ED016D080A12E1210A16ED0AF70085 |
:102A10008316A6000A1283125B240A1606306D0282 |
:102A2000031D022D3208EF001130F0000A12B62407 |
:102A30000A163A308316A6000A1283125B240A167D |
:102A40003108EF000130F0000A12B6240A160E30E9 |
:102A5000EE006E080A12E1210A16EE0AF70083164C |
:102A6000A6000A1283125B240A1612306E02031D9E |
:102A7000292D0330EF0020308316A6000A1283129E |
:102A80005B240A16EF0B3B2D6D308316A6000A124D |
:102A900083125B240A1669308316A6000A12831279 |
:102AA0005B240A166E308316A6000A1283125B247A |
:102AB0000A160330F00020308316A6000A12831293 |
:102AC0005B240A16F00B5B2D1530F10071080A1219 |
:102AD000E1210A16F10AF7008316A6000A128312F2 |
:102AE0005B240A1619307102031D662D362E6A0802 |
:102AF000403C031D8C2D3408EB003508EC00A80188 |
:102B00008B1BA8178B130A121A230A16A81B8B17E4 |
:102B10006B08B4003508EC006A08203C031DA12DA9 |
:102B20003308EB003508EC002030B300A8018B1B04 |
:102B3000A8178B130A121A230A16A81B8B1735081D |
:102B4000EC006A08303C031DB22D3408EB00B50AD6 |
:102B5000B303A8018B1BA8178B130A121A230A169A |
:102B6000A81B8B17ED016D080A12FF210A16ED0A4A |
:102B7000F7008316A6000A1283125B240A16063099 |
:102B80006D02031DB32D3308EF001130F0000A125F |
:102B9000B6240A162E308316A6000A1283125B246E |
:102BA0000A163408EF000130F0000A12B6240A16A3 |
:102BB0002E308316A6000A1283125B240A163508EB |
:102BC000EF000130F0000A12B6240A161330EE00AE |
:102BD0006E080A12FF210A16EE0AF7008316A600F5 |
:102BE0000A1283125B240A1617306E02031DE82DA9 |
:102BF0000330EF0020308316A6000A1283125B24F4 |
:102C00000A16EF0BFA2D6D308316A6000A128312F6 |
:102C10005B240A166F308316A6000A1283125B2407 |
:102C20000A166E308316A6000A1283125B240A1657 |
:102C30000330F00020308316A6000A1283125B24B2 |
:102C40000A16F00B1A2E1A30F10071080A12FF2131 |
:102C50000A16F10AF7008316A6000A1283125B24F3 |
:102C60000A161E307102031D252E362E8A150A16ED |
:102C70006D280A108A140A15820745284729962BC1 |
:102C80004E291E2A572B612CAE2BEE29D129D22C8E |
:102C9000772DDE08031D361DD72E5E0B6C2EEA0144 |
:102CA0006A08013C031C6A2E291229088316870032 |
:102CB000831207163530F700F70B5C2E291229080E |
:102CC00083168700831207123530F700F70B662E44 |
:102CD000EA0A502EDE01D42E0130DD005E08EB0042 |
:102CE0005E08273C031C832E28308316A400831221 |
:102CF0006B088316A5000A1283129F240A1678080F |
:102D0000EA00ED01EC015E08273C03189C2E5E08EA |
:102D10003B3C031C9C2EEA019C30EF004030EE004F |
:102D2000F1016B08F0000A128A15472F0A168A1162 |
:102D30007908ED007808EC005E083B3C0318A42EEF |
:102D4000EA01ED01A030EC00DE080319D42E5D0B82 |
:102D5000D42E0A128A156F270A168A11F808031D45 |
:102D6000D42EE001DF01291229088316870083127F |
:102D700007163530F700F70BBB2E291229088316EA |
:102D80008700831207122030B6066C08EE000A1284 |
:102D90008A157A2F0A168A116A088316A7000A1262 |
:102DA00083129C230A16A42EDF0A0319E00A8A154F |
:042DB0000A167E2859 |
:1030000084011F3083052913290883168700831242 |
:10301000071783161F149F141F159F1107309C005C |
:10302000FF308312A90083161F109F141F159F15D0 |
:103030001F1783121F179F1383169F1783121F14C6 |
:103040000030F8001F08C73978049F008316010874 |
:10305000C73928388100BF30831290004830F8000B |
:1030600006389200F930831692008312291129083C |
:1030700083168700831207110C30970005309500E6 |
:1030800083168C1483128B1583160C14C030831294 |
:103090008B0483168510831285100A128A11902BD7 |
:1030A0000A168A150A128A1103240A168A1505308F |
:1030B000E300B001B101B2011230B3000A30B40034 |
:1030C0000730B500D9015908D800B614D701B61C8D |
:1030D0006E285708EA008A1100288A15361D7628BE |
:1030E0001330E4000A12C92D0A167928E4080319DE |
:1030F000B615DD0803197F288A11492E8A150A1290 |
:103100006F270A16F80803199C28D608031D932870 |
:103110000A128A11F6270A168A157808D600D700EF |
:10312000B6141E30D500D508031D9B28B6145608CA |
:10313000D7000630D500A028D7015708D600D50003 |
:10314000361FDC28361DDC281F151F19A5281E0870 |
:10315000FA0083161E088312EA007A08EB00013C8D |
:103160000318DB28FF3A031DB9286A080D3C031831 |
:10317000DB28EA016A080A128A1151220A168A1506 |
:1031800000380319CD28EA0A8316A6000A128A110C |
:1031900083125B240A168A15BA280830EA00FA302E |
:1031A0008316A7000A128A1183129C230A168A1515 |
:1031B000EA0BCF28B6153613B61D75293611EA016C |
:1031C0006A080A128A1146220A168A15003803195B |
:1031D000F328EA0A8316A6000A128A1183125B24D6 |
:1031E0000A168A15E0280430EA00FA308316A70090 |
:1031F0000A128A1183129C230A168A15EA0BF528F3 |
:1032000083161F109F101F119F1183122915290863 |
:103210008316870083129701970115308316850066 |
:103220002A30831285007030831686008F30831217 |
:103230008600023083168700843083128700630083 |
:1032400000002A08203C031D1F29703083168600C9 |
:103250008312860183161F109F141F159F151F17B9 |
:1032600083121F179F1383169F1783121F1400309A |
:10327000F8001F08C73978049F00D9015908D80001 |
:103280002911290883168700831207110C30970033 |
:1032900063089500C8308316A7000A128A118312AA |
:1032A0009C230A168A1583168510831285108316AF |
:1032B0008511831285150A128A1103240A168A15AC |
:1032C0000430EA00FA308316A7000A128A1183122A |
:1032D0009C230A168A15EA0B62290A128A11F6271C |
:0E32E0000A168A15D701B611B61467286300C6 |
:02400E00393F38 |
:00000001FF |
;PIC16F876A |
/Designs/Data_loggers/GMCOUNT/SW |
---|
Property changes: |
Added: svn:ignore |
+*.err |
/Designs/Data_loggers/GMCOUNT/SCH/GMC01A.DSN |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/Designs/Data_loggers/GMCOUNT/SCH/GMC01A.pdf |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/Designs/Data_loggers/GMCOUNT/SCH/GMC01A_POWER.DSN |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/Designs/Data_loggers/GMCOUNT/SCH/GMC01A_POWER.pdf |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/Designs/Data_loggers/GMCOUNT/CAM_GMC01A/BOARD.PHO |
---|
0,0 → 1,86 |
* |
* |
G04 PADS Layout (Build Number 2007.42.1) generated Gerber (RS-274-X) file* |
G04 PC Version=2.1* |
* |
%IN "GMC01A.pcb"*% |
* |
%MOIN*% |
* |
%FSLAX35Y35*% |
* |
* |
* |
* |
G04 PC Standard Apertures* |
* |
* |
G04 Thermal Relief Aperture macro.* |
%AMTER* |
1,1,$1,0,0* |
1,0,$1-$2,0,0* |
21,0,$3,$4,0,0,45* |
21,0,$3,$4,0,0,135* |
% |
* |
* |
G04 Annular Aperture macro.* |
%AMANN* |
1,1,$1,0,0* |
1,0,$2,0,0* |
% |
* |
* |
G04 Odd Aperture macro.* |
%AMODD* |
1,1,$1,0,0* |
1,0,$1-0.005,0,0* |
% |
* |
* |
G04 PC Custom Aperture Macros* |
* |
* |
* |
* |
* |
* |
G04 PC Aperture Table* |
* |
%ADD025C,0.01*% |
* |
* |
* |
* |
G04 PC Copper Outlines (0)* |
G04 Layer Name GMC01A.pcb - dark (0)* |
%LPD*% |
* |
* |
G04 PC Area=Custom_Thermal* |
* |
G04 PC Custom Flashes* |
G04 Layer Name GMC01A.pcb - flashes* |
%LPD*% |
* |
* |
G04 PC Circuitry* |
G04 Layer Name GMC01A.pcb - circuitry* |
%LPD*% |
* |
G54D25* |
G01X108400Y330550D02* |
X145800D01* |
Y377750* |
X614200* |
Y330550* |
X651600* |
Y149450* |
X614200* |
Y102250* |
X145800* |
Y149450* |
X108400* |
Y330550* |
X0Y0D02* |
M02* |
/Designs/Data_loggers/GMCOUNT/CAM_GMC01A/BOARD_POWER.PHO |
---|
0,0 → 1,86 |
* |
* |
G04 PADS Layout (Build Number 2007.42.1) generated Gerber (RS-274-X) file* |
G04 PC Version=2.1* |
* |
%IN "GMC01A-POWER.pcb"*% |
* |
%MOIN*% |
* |
%FSLAX35Y35*% |
* |
* |
* |
* |
G04 PC Standard Apertures* |
* |
* |
G04 Thermal Relief Aperture macro.* |
%AMTER* |
1,1,$1,0,0* |
1,0,$1-$2,0,0* |
21,0,$3,$4,0,0,45* |
21,0,$3,$4,0,0,135* |
% |
* |
* |
G04 Annular Aperture macro.* |
%AMANN* |
1,1,$1,0,0* |
1,0,$2,0,0* |
% |
* |
* |
G04 Odd Aperture macro.* |
%AMODD* |
1,1,$1,0,0* |
1,0,$1-0.005,0,0* |
% |
* |
* |
G04 PC Custom Aperture Macros* |
* |
* |
* |
* |
* |
* |
G04 PC Aperture Table* |
* |
%ADD025C,0.01*% |
* |
* |
* |
* |
G04 PC Copper Outlines (0)* |
G04 Layer Name GMC01A-POWER.pcb - dark (0)* |
%LPD*% |
* |
* |
G04 PC Area=Custom_Thermal* |
* |
G04 PC Custom Flashes* |
G04 Layer Name GMC01A-POWER.pcb - flashes* |
%LPD*% |
* |
* |
G04 PC Circuitry* |
G04 Layer Name GMC01A-POWER.pcb - circuitry* |
%LPD*% |
* |
G54D25* |
G01X108400Y330550D02* |
X145800D01* |
Y377750* |
X614200* |
Y330550* |
X651600* |
Y149450* |
X614200* |
Y102250* |
X145800* |
Y149450* |
X108400* |
Y330550* |
X0Y0D02* |
M02* |
/Designs/Data_loggers/GMCOUNT/CAM_GMC01A/DRILL.DRL |
---|
0,0 → 1,107 |
% |
T1C.02F197S55 |
X036025Y035866 |
X044654Y035866 |
T2C.025F197S55 |
X05993Y017972 |
X06073Y017972 |
X06073Y018972 |
X05993Y018972 |
T3C.028F197S55 |
X039775Y035526 |
X040904Y035526 |
X040904Y036206 |
X039775Y036206 |
T4C.035F197S55 |
X020686Y035985 |
X023686Y035985 |
X021686Y035985 |
X025686Y035985 |
X024686Y035985 |
X029169Y035985 |
X030169Y035985 |
X031169Y035985 |
X030334Y034678 |
X031334Y034678 |
X031334Y031678 |
X030334Y031678 |
X033334Y031678 |
X032334Y031678 |
X036334Y031678 |
X035334Y031678 |
X034334Y031678 |
X034334Y034678 |
X035334Y034678 |
X036334Y034678 |
X032334Y034678 |
X033334Y034678 |
X035169Y035985 |
X033169Y035985 |
X034169Y035985 |
X032169Y035985 |
X037334Y034678 |
X038334Y034678 |
X039334Y034678 |
X040334Y034678 |
X041334Y034678 |
X037334Y031678 |
X038334Y031678 |
X041334Y031678 |
X040334Y031678 |
X039334Y031678 |
X045716Y031649 |
X044636Y031649 |
X043334Y031678 |
X042334Y031678 |
X043334Y034678 |
X042334Y034678 |
X05857Y029186 |
X05857Y028186 |
X063266Y027131 |
X063266Y028168 |
X06157Y028186 |
X06157Y029186 |
X063266Y029204 |
T5C.037F197S55 |
X028384Y030998 |
X026726Y031672 |
X024683Y031672 |
X026712Y032603 |
X026712Y034494 |
X023688Y035247 |
X029169Y035247 |
X029369Y033851 |
X02938Y031675 |
X0515Y01625 |
X041Y030998 |
X0515Y03175 |
X057792Y031743 |
X05825Y01625 |
T6C.04F139S55 |
X0254Y03025 |
X0264Y03025 |
X0274Y03025 |
X0284Y03025 |
X0294Y03025 |
X0304Y03025 |
X0354Y03025 |
X0364Y03025 |
X0374Y03025 |
X0384Y03025 |
X05273Y0179 |
X05276Y0179 |
T7C.09F066S55 |
X06183Y016072 |
X06183Y020872 |
T8C.102F069S658 |
X02325Y0179 |
X02325Y0301 |
X05275Y0179 |
T9C.102F069S658 |
X05275Y0301 |
T10C.12598F035S794 |
X016349Y013173 |
X016349Y034827 |
X059651Y034827 |
X059651Y013173 |
M30 |
/Designs/Data_loggers/GMCOUNT/CAM_GMC01A/DRILL_POWER.DRL |
---|
0,0 → 1,70 |
% |
T1C.001F0S0 |
X04875Y011477 |
X05075Y011477 |
T2C.035F197S55 |
X018253Y011606 |
X018253Y022426 |
X020622Y023691 |
X02617Y036282 |
X024179Y036245 |
X028201Y034994 |
X024179Y032745 |
X025078Y025094 |
X025133Y023691 |
X024122Y023691 |
X027037Y022232 |
X027037Y018732 |
X027037Y017446 |
X027037Y013946 |
X028704Y015714 |
X028704Y021314 |
X029935Y023558 |
X028633Y023691 |
X029935Y024558 |
X028578Y025094 |
X029935Y025558 |
X029935Y026558 |
X030169Y033864 |
X029169Y033864 |
X02967Y036282 |
X030618Y036282 |
X034118Y036282 |
X032994Y03503 |
X031701Y034994 |
X031169Y033864 |
X033169Y033864 |
X032169Y033864 |
X034169Y033864 |
X035169Y033864 |
X032935Y026558 |
X032935Y025558 |
X032935Y024558 |
X032935Y023558 |
X034304Y021314 |
X035541Y017863 |
X034304Y015714 |
X041169Y011481 |
X037106Y011484 |
X041169Y012861 |
X037106Y012864 |
X036494Y03503 |
X045111Y012861 |
X045111Y011481 |
X056704Y023072 |
T3C.037F197S55 |
X029654Y027934 |
X029648Y031689 |
X032331Y032983 |
X033173Y032253 |
X032336Y029016 |
X033177Y027388 |
T4C.04F139S55 |
X015509Y017863 |
X013509Y017863 |
T5C.12598F035S794 |
X016349Y013173 |
X016349Y034827 |
X059651Y034827 |
X059651Y013173 |
M30 |
/Designs/Data_loggers/GMCOUNT/CAM_GMC01A/V1.PHO |
---|
0,0 → 1,3243 |
* |
* |
G04 PADS Layout (Build Number 2007.42.1) generated Gerber (RS-274-X) file* |
G04 PC Version=2.1* |
* |
%IN "GMC01A.pcb"*% |
* |
%MOIN*% |
* |
%FSLAX35Y35*% |
* |
* |
* |
* |
G04 PC Standard Apertures* |
* |
* |
G04 Thermal Relief Aperture macro.* |
%AMTER* |
1,1,$1,0,0* |
1,0,$1-$2,0,0* |
21,0,$3,$4,0,0,45* |
21,0,$3,$4,0,0,135* |
% |
* |
* |
G04 Annular Aperture macro.* |
%AMANN* |
1,1,$1,0,0* |
1,0,$2,0,0* |
% |
* |
* |
G04 Odd Aperture macro.* |
%AMODD* |
1,1,$1,0,0* |
1,0,$1-0.005,0,0* |
% |
* |
* |
G04 PC Custom Aperture Macros* |
* |
* |
* |
* |
* |
* |
G04 PC Aperture Table* |
* |
%ADD010R,0.039X0.039*% |
%ADD011C,0.06*% |
%ADD012R,0.07X0.07*% |
%ADD013C,0.23622*% |
%ADD017C,0.02*% |
%ADD019C,0.03*% |
%ADD020C,0.012*% |
%ADD022C,0.055*% |
%ADD025C,0.01*% |
%ADD031C,0.07*% |
%ADD035C,0.065*% |
%ADD040R,0.06X0.06*% |
%ADD042C,0.045*% |
%ADD043R,0.055X0.055*% |
%ADD044R,0.04X0.04*% |
%ADD045R,0.065X0.065*% |
%ADD046C,0.14*% |
%ADD047C,0.177*% |
%ADD048C,0.018*% |
%ADD049C,0.035*% |
* |
* |
* |
* |
G04 PC Copper Outlines (0)* |
G04 Layer Name GMC01A.pcb - dark (0)* |
%LPD*% |
* |
* |
G04 PC Area=ANP000033* |
G75* |
G36* |
G01* |
X648600Y233045D02* |
X648454Y233399D01* |
X648100Y233545D01* |
X634401D01* |
X634047Y233692D01* |
X599850Y267889D01* |
X599703Y268243D01* |
Y332215D01* |
X599996Y332508D01* |
X610700D01* |
X611054Y332654D01* |
X611200Y333008D01* |
Y342519D01* |
X611003Y342917D01* |
X610568Y343001D01* |
X610237Y342707D01* |
X609741Y341483D01* |
X608331Y339250D01* |
X606549Y337301D01* |
X604450Y335698D01* |
X602101Y334491D01* |
X599575Y333720D01* |
X596953Y333407D01* |
X594316Y333563D01* |
X591749Y334183D01* |
X589332Y335247D01* |
X587142Y336723D01* |
X585247Y338562D01* |
X583707Y340708D01* |
X582571Y343092D01* |
X581875Y345639D01* |
X581640Y348270D01* |
X581875Y350901D01* |
X582571Y353448D01* |
X583707Y355832D01* |
X585247Y357978D01* |
X587142Y359817D01* |
X589332Y361293D01* |
X591749Y362357D01* |
X594316Y362977D01* |
X596953Y363133D01* |
X599575Y362820D01* |
X602101Y362049D01* |
X604450Y360842D01* |
X606549Y359239D01* |
X608331Y357290D01* |
X609741Y355057D01* |
X610237Y353833D01* |
X610568Y353539D01* |
X611003Y353623D01* |
X611200Y354021D01* |
Y374250D01* |
X611054Y374604D01* |
X610700Y374750D01* |
X304368D01* |
X304014Y374604D01* |
X303868Y374250D01* |
X304014Y373896D01* |
X311938Y365972D01* |
X312246Y365828D01* |
X313032Y365755D01* |
X314514Y365208D01* |
X315804Y364295D01* |
X316308Y363687D01* |
X316693Y363507D01* |
X317077Y363687D01* |
X317561Y364269D01* |
X318786Y365156D01* |
X320192Y365712D01* |
X321693Y365901D01* |
X323193Y365712D01* |
X324600Y365156D01* |
X325825Y364269D01* |
X326308Y363687D01* |
X326693Y363507D01* |
X327077Y363687D01* |
X327561Y364269D01* |
X328786Y365156D01* |
X330192Y365712D01* |
X331693Y365901D01* |
X333193Y365712D01* |
X334600Y365156D01* |
X335825Y364269D01* |
X336308Y363687D01* |
X336693Y363507D01* |
X337077Y363687D01* |
X337592Y364307D01* |
X338910Y365230D01* |
X340426Y365773D01* |
X342031Y365898D01* |
X343612Y365595D01* |
X345057Y364887D01* |
X346265Y363822D01* |
X347149Y362477D01* |
X347647Y360946D01* |
X347725Y359338D01* |
X347550Y358553D01* |
X347685Y358091D01* |
X352850Y352925D01* |
X353214Y352779D01* |
X353891Y352793D01* |
X355216Y352519D01* |
X356447Y351956D01* |
X357522Y351134D01* |
X357954Y350614D01* |
X358339Y350433D01* |
X358723Y350614D01* |
X359242Y351238D01* |
X360573Y352166D01* |
X362104Y352707D01* |
X363723Y352822D01* |
X365314Y352503D01* |
X366764Y351773D01* |
X367967Y350683D01* |
X368838Y349313D01* |
X369313Y347761D01* |
X369359Y346139D01* |
X368973Y344563D01* |
X368577Y343854D01* |
X368522Y343519D01* |
X368694Y343226D01* |
X369013Y343110D01* |
X377664D01* |
X377983Y343226D01* |
X378155Y343519D01* |
X378100Y343854D01* |
X377770Y344446D01* |
X377389Y345748D01* |
X377309Y347103D01* |
X377421Y347771D01* |
X377428Y347854D01* |
X377315Y348171D01* |
X377026Y348344D01* |
X376516Y348446D01* |
X375623Y348982D01* |
X374963Y349786D01* |
X374613Y350766D01* |
Y355760D01* |
X374494Y356083D01* |
X374194Y356253D01* |
X373668Y356340D01* |
X372740Y356865D01* |
X372050Y357678D01* |
X371682Y358680D01* |
Y365410D01* |
X372139Y366512D01* |
X372983Y367356D01* |
X374085Y367813D01* |
X379002D01* |
X379811Y367582D01* |
X380168Y367360D01* |
X380432Y367284D01* |
X380696Y367360D01* |
X381053Y367582D01* |
X381862Y367813D01* |
X386719D01* |
X387727Y367440D01* |
X388543Y366740D01* |
X388804Y366270D01* |
X388988Y366082D01* |
X389241Y366013D01* |
X394112D01* |
X394428Y366126D01* |
X395033Y366620D01* |
X396477Y367213D01* |
X398031Y367360D01* |
X399560Y367049D01* |
X400934Y366306D01* |
X402031Y365196D01* |
X402758Y363814D01* |
X402905Y363048D01* |
X403174Y362694D01* |
X403618D01* |
X403887Y363048D01* |
X404028Y363783D01* |
X404710Y365117D01* |
X405739Y366207D01* |
X407030Y366966D01* |
X408483Y367333D01* |
X409232Y367306D01* |
X409477Y367361D01* |
X409665Y367528D01* |
X409940Y367940D01* |
X410726Y368542D01* |
X411664Y368861D01* |
X416480D01* |
X417288Y368630D01* |
X417645Y368407D01* |
X417909Y368332D01* |
X418174Y368407D01* |
X418530Y368630D01* |
X419339Y368861D01* |
X424256D01* |
X425359Y368404D01* |
X426203Y367560D01* |
X426659Y366457D01* |
Y360261D01* |
X426497Y359206D01* |
X426659Y358151D01* |
Y356833D01* |
X426783Y356504D01* |
X427092Y356337D01* |
X427434Y356415D01* |
X427923Y356737D01* |
X429046Y357073D01* |
X441082D01* |
X442100Y356800D01* |
X443012Y356274D01* |
X447806Y351480D01* |
X448159Y351333D01* |
X449081D01* |
X449331Y351400D01* |
X449514Y351583D01* |
X449778Y352042D01* |
X450589Y352722D01* |
X451583Y353083D01* |
X457498D01* |
X457851Y353230D01* |
X457998Y353583D01* |
X457851Y353937D01* |
X457351Y354437D01* |
X456998Y354583D01* |
X451515D01* |
X450412Y355040D01* |
X449568Y355884D01* |
X449112Y356987D01* |
Y363680D01* |
X449568Y364783D01* |
X450412Y365627D01* |
X451515Y366083D01* |
X462708D01* |
X463811Y365627D01* |
X464655Y364783D01* |
X465112Y363680D01* |
Y358783D01* |
X465258Y358430D01* |
X465612Y358283D01* |
X468867D01* |
X469295Y358252D01* |
X469694Y358369D01* |
X469867Y358747D01* |
Y359880D01* |
X470323Y360983D01* |
X471167Y361827D01* |
X472270Y362283D01* |
X476397D01* |
X476750Y362430D01* |
X476897Y362783D01* |
Y363680D01* |
X477353Y364783D01* |
X478197Y365627D01* |
X479300Y366083D01* |
X490493D01* |
X491596Y365627D01* |
X492440Y364783D01* |
X492897Y363680D01* |
Y356987D01* |
X492440Y355884D01* |
X491596Y355040D01* |
X490493Y354583D01* |
X480155D01* |
X479868Y354493D01* |
X479685Y354255D01* |
X479489Y353826D01* |
X479435Y353491D01* |
X479607Y353199D01* |
X479926Y353083D01* |
X490493D01* |
X491596Y352627D01* |
X492440Y351783D01* |
X492897Y350680D01* |
Y343987D01* |
X492440Y342884D01* |
X491596Y342040D01* |
X490493Y341583D01* |
X479375D01* |
X478393Y341936D01* |
X477587Y342599D01* |
X477320Y343047D01* |
X477138Y343225D01* |
X476891Y343291D01* |
X476456D01* |
X475664Y343452D01* |
X475293Y343610D01* |
X475002Y343641D01* |
X474744Y343503D01* |
X470649Y339409D01* |
X470502Y339055D01* |
X470649Y338701D01* |
X471002Y338555D01* |
X529317D01* |
X547195D01* |
X548213Y338282D01* |
X549125Y337756D01* |
X553370Y333511D01* |
X553896Y332599D01* |
X554169Y331582D01* |
Y148629D01* |
X553893Y147607D01* |
X553362Y146692D01* |
X518287Y111892D01* |
X518139Y111539D01* |
X518285Y111184D01* |
X518639Y111037D01* |
X530766D01* |
X531120Y111184D01* |
X557902Y137966D01* |
X558048Y138319D01* |
Y155522D01* |
X558355Y156666D01* |
X558947Y157692D01* |
X571486Y170231D01* |
X571632Y170584D01* |
Y175360D01* |
X572089Y176462D01* |
X572933Y177306D01* |
X574035Y177763D01* |
X584095D01* |
X584449Y177909D01* |
X584595Y178263D01* |
Y178763D01* |
X584449Y179117D01* |
X584095Y179263D01* |
X574035D01* |
X572933Y179720D01* |
X572089Y180564D01* |
X571632Y181666D01* |
Y188360D01* |
X572089Y189462D01* |
X572933Y190306D01* |
X574035Y190763D01* |
X583909D01* |
X584263Y190909D01* |
X584409Y191263D01* |
X584345Y191928D01* |
Y196424D01* |
X584802Y197527D01* |
X585646Y198371D01* |
X586749Y198828D01* |
X593484D01* |
X594495Y198453D01* |
X594903Y198101D01* |
X595334Y197991D01* |
X595682Y198267D01* |
X596473Y199392D01* |
X598378Y201297D01* |
X598524Y201650D01* |
Y206451D01* |
X598351Y206829D01* |
X597953Y206946D01* |
X597443Y206910D01* |
X572797D01* |
X571881Y207155D01* |
X571060Y207629D01* |
X570096Y208594D01* |
X569742Y208740D01* |
X566923D01* |
X566569Y208594D01* |
X566423Y208240D01* |
Y200743D01* |
X565967Y199954D01* |
X565178Y199499D01* |
X561222D01* |
X560433Y199954D01* |
X559977Y200743D01* |
Y208241D01* |
X559839Y208586D01* |
X559501Y208741D01* |
X559301Y208750D01* |
X559025Y209040D01* |
Y229230D01* |
X558874Y229588D01* |
X558299Y230147D01* |
X558121Y230259D01* |
X557541Y230469D01* |
X556561Y231218D01* |
X555853Y232228D01* |
X555481Y233404D01* |
Y255612D01* |
X555754Y256629D01* |
X556281Y257541D01* |
X571316Y272576D01* |
X572509Y273162D01* |
X573168Y273246D01* |
X573511Y273451D01* |
X573764Y273759D01* |
X573900Y274101D01* |
Y294530D01* |
X573900D01* |
X573915Y313093D01* |
X573775Y313439D01* |
X573264Y313971D01* |
X572542Y315259D01* |
X572169Y316688D01* |
Y318253D01* |
X572635Y319839D01* |
X573529Y321230D01* |
X574778Y322313D01* |
X576282Y323000D01* |
X577919Y323235D01* |
X579555Y323000D01* |
X581060Y322313D01* |
X582309Y321230D01* |
X583203Y319839D01* |
X583669Y318253D01* |
Y316686D01* |
X583294Y315255D01* |
X582569Y313965D01* |
X582055Y313432D01* |
X581915Y313085D01* |
X581900Y294526D01* |
Y288348D01* |
X582062Y287980D01* |
X582443Y287850D01* |
X582703Y287862D01* |
X589300D01* |
X590403Y287405D01* |
X591247Y286561D01* |
X591703Y285458D01* |
Y278258D01* |
X591236Y277145D01* |
X590375Y276299D01* |
X589814Y276075D01* |
X589586Y275891D01* |
X589500Y275611D01* |
Y274101D01* |
X589635Y273759D01* |
X590028Y273341D01* |
X590450Y272276D01* |
Y266604D01* |
X590417Y266161D01* |
X590533Y265761D01* |
X590911Y265587D01* |
X594944D01* |
X596046Y265131D01* |
X596890Y264287D01* |
X597347Y263184D01* |
Y260924D01* |
X597573Y260506D01* |
X598047Y260466D01* |
X598597Y260705D01* |
X599788Y260841D01* |
X600968Y260622D01* |
X602031Y260066D01* |
X606347Y255803D01* |
X606699Y255658D01* |
X608241D01* |
X608534Y255365D01* |
Y253851D01* |
X608683Y253495D01* |
X631571Y230886D01* |
X632106Y229969D01* |
X632383Y228944D01* |
Y186885D01* |
X632110Y185867D01* |
X631584Y184955D01* |
X615512Y168884D01* |
X614600Y168357D01* |
X613583Y168085D01* |
X595093D01* |
X594750Y167949D01* |
X594333Y167557D01* |
X593268Y167135D01* |
X587595D01* |
X587085Y167178D01* |
X586662Y167054D01* |
X586247Y166672D01* |
X585196Y166263D01* |
X580453D01* |
X580100Y166117D01* |
X567195Y153212D01* |
X567048Y152858D01* |
Y135656D01* |
X566742Y134511D01* |
X566149Y133485D01* |
X538768Y106104D01* |
X538621Y105750D01* |
X538768Y105396D01* |
X539121Y105250D01* |
X610700D01* |
X611054Y105396D01* |
X611200Y105750D01* |
Y125979D01* |
X611003Y126377D01* |
X610568Y126461D01* |
X610237Y126167D01* |
X609741Y124943D01* |
X608331Y122710D01* |
X606549Y120761D01* |
X604450Y119158D01* |
X602101Y117951D01* |
X599575Y117180D01* |
X596953Y116867D01* |
X594316Y117023D01* |
X591749Y117643D01* |
X589332Y118707D01* |
X587142Y120183D01* |
X585247Y122022D01* |
X583707Y124168D01* |
X582571Y126552D01* |
X581875Y129099D01* |
X581640Y131730D01* |
X581875Y134361D01* |
X582571Y136908D01* |
X583707Y139292D01* |
X585247Y141438D01* |
X587142Y143277D01* |
X589332Y144753D01* |
X591749Y145817D01* |
X594316Y146437D01* |
X596953Y146593D01* |
X599575Y146280D01* |
X602101Y145509D01* |
X604450Y144302D01* |
X606549Y142699D01* |
X608331Y140750D01* |
X609741Y138517D01* |
X610237Y137293D01* |
X610568Y136999D01* |
X611003Y137083D01* |
X611200Y137481D01* |
Y150047D01* |
X611657Y151149D01* |
X612501Y151993D01* |
X613603Y152450D01* |
X648100D01* |
X648454Y152596D01* |
X648600Y152950D01* |
Y233045D01* |
G37* |
G74* |
* |
* |
G04 PC Copper Outlines (1)* |
G04 Layer Name GMC01A.pcb - dark (1)* |
%LPD*% |
* |
* |
G04 PC Area=ANP000029* |
G75* |
G36* |
G01* |
X300379Y111593D02* |
X300354Y112039D01* |
Y116078D01* |
X300276Y116345D01* |
X300068Y116529D01* |
X299553Y116774D01* |
X298773Y117607D01* |
X298354Y118669D01* |
Y125240D01* |
X298472Y126140D01* |
X298325Y126493D01* |
X297972Y126640D01* |
X291740D01* |
X290685Y126982D01* |
X289788Y127634D01* |
X289136Y128531D01* |
X288794Y129585D01* |
Y149375D01* |
X289007Y150219D01* |
X289214Y150602D01* |
X289274Y150840D01* |
X289214Y151077D01* |
X289007Y151460D01* |
X288794Y152305D01* |
Y154894D01* |
X289136Y155949D01* |
X289788Y156846D01* |
X290685Y157497D01* |
X291740Y157840D01* |
X297972D01* |
X298325Y157986D01* |
X298472Y158340D01* |
X298354Y159240D01* |
Y165691D01* |
X298620Y166555D01* |
X298874Y166928D01* |
X298961Y167209D01* |
X298814Y167563D01* |
X298461Y167709D01* |
X246475D01* |
X246092Y167531D01* |
X245140Y166396D01* |
X242892Y164469D01* |
X240359Y162936D01* |
X237609Y161836D01* |
X234717Y161200D01* |
X231760Y161045D01* |
X228817Y161375D01* |
X225968Y162182D01* |
X223289Y163442D01* |
X220851Y165124D01* |
X218721Y167181D01* |
X216956Y169558D01* |
X215602Y172192D01* |
X214697Y175011D01* |
X214264Y177941D01* |
X214316Y180901D01* |
X214851Y183814D01* |
X215854Y186600D01* |
X217298Y189185D01* |
X219146Y191499D01* |
X220246Y192490D01* |
X220411Y192861D01* |
Y286298D01* |
X220237Y286678D01* |
X219074Y287673D01* |
X217100Y290010D01* |
X215528Y292635D01* |
X214400Y295479D01* |
X213744Y298468D01* |
X213578Y301523D01* |
X213905Y304565D01* |
X214719Y307514D01* |
X215997Y310294D01* |
X217705Y312832D01* |
X219800Y315062D01* |
X222227Y316925D01* |
X224922Y318373D01* |
X227815Y319368D01* |
X230831Y319885D01* |
X232361Y319897D01* |
X232712Y320045D01* |
X232857Y320397D01* |
Y348157D01* |
X232718Y348502D01* |
X232430Y348828D01* |
X232043Y349011D01* |
X231160D01* |
X230818Y348875D01* |
X230400Y348483D01* |
X229335Y348061D01* |
X223066D01* |
X221963Y348518D01* |
X221119Y349362D01* |
X220663Y350464D01* |
Y355381D01* |
X220894Y356190D01* |
X221116Y356547D01* |
X221192Y356811D01* |
X221116Y357075D01* |
X220894Y357432D01* |
X220663Y358240D01* |
Y361292D01* |
X220516Y361645D01* |
X220163Y361792D01* |
X213196D01* |
X212842Y361645D01* |
X212696Y361292D01* |
X212857Y359854D01* |
Y359002D01* |
X212383Y357366D01* |
X211472Y355927D01* |
X210197Y354797D01* |
X208659Y354067D01* |
X206977Y353795D01* |
X205287Y354000D01* |
X203720Y354668D01* |
X202401Y355746D01* |
X201434Y357148D01* |
X200895Y358764D01* |
X200828Y360466D01* |
X201236Y362119D01* |
X202088Y363594D01* |
X202703Y364183D01* |
X202857Y364544D01* |
Y366332D01* |
X202886Y366820D01* |
X202765Y367212D01* |
X202390Y367381D01* |
X201170D01* |
X200817Y367234D01* |
X198496Y364913D01* |
X198349Y364560D01* |
Y176639D01* |
X198496Y176286D01* |
X263686Y111184D01* |
X264039Y111037D01* |
X299882D01* |
X300255Y111204D01* |
X300379Y111593D01* |
G37* |
G74* |
* |
* |
G04 PC Copper Outlines (2)* |
G04 Layer Name GMC01A.pcb - dark (2)* |
%LPD*% |
* |
* |
G04 PC Area=ANP000019* |
G75* |
G36* |
G01* |
X398255Y321331D02* |
X388422D01* |
X388068Y321184D01* |
X387922Y320831D01* |
X388031Y320519D01* |
X388452Y319991D01* |
X389038Y318773D01* |
X389339Y317455D01* |
Y316780D01* |
X389274Y315868D01* |
X389381Y315559D01* |
X391499Y312861D01* |
X391892Y312670D01* |
X397933D01* |
X398263Y312794D01* |
X398429Y313104D01* |
X398349Y313447D01* |
X397926Y314080D01* |
X397424Y315517D01* |
X397296Y317034D01* |
X397551Y318535D01* |
X398172Y319924D01* |
X398646Y320519D01* |
X398754Y320868D01* |
X398595Y321197D01* |
X398255Y321331D01* |
G37* |
G74* |
* |
* |
G04 PC Copper Outlines (3)* |
G04 Layer Name GMC01A.pcb - dark (3)* |
%LPD*% |
* |
* |
G04 PC Area=ANP000016* |
G75* |
G36* |
G01* |
X378185Y116925D02* |
X377843Y117208D01* |
X377351Y117946D01* |
X377094Y118796D01* |
Y125240D01* |
X377212Y126140D01* |
X377065Y126493D01* |
X376712Y126640D01* |
X370440D01* |
X369385Y126982D01* |
X368488Y127634D01* |
X367836Y128531D01* |
X367494Y129585D01* |
Y149375D01* |
X367707Y150219D01* |
X367914Y150602D01* |
X367974Y150840D01* |
X367914Y151077D01* |
X367707Y151460D01* |
X367494Y152305D01* |
Y154894D01* |
X367836Y155949D01* |
X368488Y156846D01* |
X369385Y157497D01* |
X370440Y157840D01* |
X376712D01* |
X377065Y157986D01* |
X377212Y158340D01* |
X377094Y159240D01* |
Y165691D01* |
X377360Y166555D01* |
X377614Y166928D01* |
X377701Y167209D01* |
X377554Y167563D01* |
X377201Y167709D01* |
X310247D01* |
X309917Y167584D01* |
X309751Y167272D01* |
X309834Y166928D01* |
X310088Y166555D01* |
X310354Y165691D01* |
Y159240D01* |
X310236Y158340D01* |
X310383Y157986D01* |
X310736Y157840D01* |
X317048D01* |
X318103Y157497D01* |
X319000Y156846D01* |
X319651Y155949D01* |
X319994Y154894D01* |
Y152305D01* |
X319781Y151460D01* |
X319574Y151077D01* |
X319514Y150840D01* |
X319574Y150602D01* |
X319781Y150219D01* |
X319994Y149375D01* |
Y129585D01* |
X319651Y128531D01* |
X319000Y127634D01* |
X318103Y126982D01* |
X317048Y126640D01* |
X310736D01* |
X310383Y126493D01* |
X310236Y126140D01* |
X310354Y125240D01* |
Y118796D01* |
X310097Y117946D01* |
X309605Y117208D01* |
X309262Y116925D01* |
X309081Y116539D01* |
X309227Y116186D01* |
X309581Y116039D01* |
X377867D01* |
X378232Y116197D01* |
X378366Y116571D01* |
X378185Y116925D01* |
G37* |
G74* |
* |
* |
G04 PC Copper Outlines (4)* |
G04 Layer Name GMC01A.pcb - dark (4)* |
%LPD*% |
* |
* |
G04 PC Area=ANP000013* |
G75* |
G36* |
G01* |
X456441Y167209D02* |
X456294Y167563D01* |
X455941Y167709D01* |
X388987D01* |
X388657Y167584D01* |
X388491Y167272D01* |
X388574Y166928D01* |
X388828Y166555D01* |
X389094Y165691D01* |
Y159240D01* |
X388976Y158340D01* |
X389123Y157986D01* |
X389476Y157840D01* |
X395748D01* |
X396803Y157497D01* |
X397700Y156846D01* |
X398351Y155949D01* |
X398694Y154894D01* |
Y152305D01* |
X398481Y151460D01* |
X398274Y151077D01* |
X398214Y150840D01* |
X398274Y150602D01* |
X398481Y150219D01* |
X398694Y149375D01* |
Y129585D01* |
X398351Y128531D01* |
X397700Y127634D01* |
X396803Y126982D01* |
X395748Y126640D01* |
X389476D01* |
X389123Y126493D01* |
X388976Y126140D01* |
X389094Y125240D01* |
Y120666D01* |
X389240Y120312D01* |
X389594Y120166D01* |
X455334D01* |
X455687Y120312D01* |
X455834Y120666D01* |
Y125240D01* |
X455952Y126140D01* |
X455805Y126493D01* |
X455452Y126640D01* |
X449140D01* |
X448085Y126982D01* |
X447188Y127634D01* |
X446536Y128531D01* |
X446194Y129585D01* |
Y149375D01* |
X446407Y150219D01* |
X446614Y150602D01* |
X446674Y150840D01* |
X446614Y151077D01* |
X446407Y151460D01* |
X446194Y152305D01* |
Y154894D01* |
X446536Y155949D01* |
X447188Y156846D01* |
X448085Y157497D01* |
X449140Y157840D01* |
X455452D01* |
X455805Y157986D01* |
X455952Y158340D01* |
X455834Y159240D01* |
Y165691D01* |
X456100Y166555D01* |
X456354Y166928D01* |
X456441Y167209D01* |
G37* |
G74* |
* |
* |
G04 PC Copper Outlines (5)* |
G04 Layer Name GMC01A.pcb - dark (5)* |
%LPD*% |
* |
* |
G04 PC Area=ANP000008* |
G75* |
G36* |
G01* |
X539291Y164859D02* |
X539157Y165199D01* |
X538827Y165357D01* |
X538477Y165248D01* |
X537401Y164379D01* |
X535009Y162994D01* |
X532431Y161992D01* |
X529731Y161398D01* |
X526971Y161226D01* |
X524218Y161480D01* |
X521536Y162153D01* |
X518990Y163230D01* |
X516639Y164685D01* |
X514539Y166484D01* |
X513640Y167534D01* |
X513260Y167709D01* |
X467727D01* |
X467397Y167584D01* |
X467231Y167272D01* |
X467314Y166928D01* |
X467568Y166555D01* |
X467834Y165691D01* |
Y159240D01* |
X467716Y158340D01* |
X467863Y157986D01* |
X468216Y157840D01* |
X474448D01* |
X475503Y157497D01* |
X476400Y156846D01* |
X477051Y155949D01* |
X477394Y154894D01* |
Y152305D01* |
X477181Y151460D01* |
X476974Y151077D01* |
X476914Y150840D01* |
X476974Y150602D01* |
X477181Y150219D01* |
X477394Y149375D01* |
Y129540D01* |
X476994Y128408D01* |
X476240Y127474D01* |
X475728Y127159D01* |
X475554Y126977D01* |
X475490Y126733D01* |
X475637Y126380D01* |
X475990Y126233D01* |
X506494Y126219D01* |
X506847Y126365D01* |
X539144Y158581D01* |
X539291Y158935D01* |
Y164859D01* |
G37* |
G74* |
* |
* |
G04 PC Copper Outlines (6)* |
G04 Layer Name GMC01A.pcb - dark (6)* |
%LPD*% |
* |
* |
G04 PC Area=ANP000003* |
G75* |
G36* |
G01* |
X578566Y256837D02* |
X578491Y257102D01* |
X578268Y257458D01* |
X578037Y258267D01* |
Y262587D01* |
X578070Y263030D01* |
X577954Y263430D01* |
X577576Y263604D01* |
X575576D01* |
X574852Y263787D01* |
X574523Y263965D01* |
X574213Y264019D01* |
X573932Y263878D01* |
X566565Y256512D01* |
X566419Y256158D01* |
X566565Y255805D01* |
X566919Y255658D01* |
X577739D01* |
X578027Y255750D01* |
X578210Y255991D01* |
X578491Y256573D01* |
X578566Y256837D01* |
G37* |
G74* |
* |
* |
G04 PC Copper Outlines (7)* |
G04 Layer Name GMC01A.pcb - dark (7)* |
%LPD*% |
* |
* |
G04 PC Area=ANP000000* |
G75* |
G36* |
G01* |
X624383Y226533D02* |
X624234Y226889D01* |
X609386Y241556D01* |
X609032Y241700D01* |
X608680Y241553D01* |
X608534Y241200D01* |
Y239042D01* |
X608681Y238688D01* |
X610502Y236867D01* |
X611028Y235955D01* |
X611301Y234938D01* |
Y194747D01* |
X611468Y194374D01* |
X612116Y193795D01* |
X613046Y192326D01* |
X613540Y190658D01* |
X613561Y188920D01* |
X613106Y187241D01* |
X612210Y185751D01* |
X610941Y184561D01* |
X609396Y183764D01* |
X607692Y183418D01* |
X605958Y183550D01* |
X605142Y183851D01* |
X604738Y183825D01* |
X604486Y183509D01* |
X604549Y183110D01* |
X605000Y182413D01* |
X605506Y180832D01* |
X605582Y179173D01* |
X605223Y177552D01* |
X604838Y176817D01* |
X604791Y176484D01* |
X604965Y176197D01* |
X605281Y176085D01* |
X611192D01* |
X611546Y176231D01* |
X624236Y188922D01* |
X624383Y189275D01* |
Y226533D01* |
G37* |
G74* |
* |
* |
G04 PC Copper Outlines (8)* |
G04 Layer Name GMC01A.pcb - dark (8)* |
%LPD*% |
* |
* |
G04 PC Area=CFC0* |
G75* |
G36* |
G01* |
X395194Y154340D02* |
X370994D01* |
Y152740D01* |
X395194D01* |
Y154340D01* |
G37* |
G74* |
* |
* |
G04 PC Copper Outlines (9)* |
G04 Layer Name GMC01A.pcb - dark (9)* |
%LPD*% |
* |
* |
G04 PC Area=CFC1* |
G75* |
G36* |
G01* |
X395194Y131740D02* |
X370994D01* |
Y130140D01* |
X395194D01* |
Y131740D01* |
G37* |
G74* |
* |
* |
G04 PC Copper Outlines (10)* |
G04 Layer Name GMC01A.pcb - dark (10)* |
%LPD*% |
* |
* |
G04 PC Area=CFC2* |
G75* |
G36* |
G01* |
X383994Y148940D02* |
X382094D01* |
Y125240D01* |
X383994D01* |
Y148940D01* |
G37* |
G74* |
* |
* |
G04 PC Copper Outlines (11)* |
G04 Layer Name GMC01A.pcb - dark (11)* |
%LPD*% |
* |
* |
G04 PC Area=CFC3* |
G75* |
G36* |
G01* |
X389694Y153740D02* |
X387694D01* |
Y135540D01* |
X389694D01* |
Y153740D01* |
G37* |
G74* |
* |
* |
G04 PC Copper Outlines (12)* |
G04 Layer Name GMC01A.pcb - dark (12)* |
%LPD*% |
* |
* |
G04 PC Area=CFC4* |
G75* |
G36* |
G01* |
X395194Y148940D02* |
X393294D01* |
Y130740D01* |
X395194D01* |
Y148940D01* |
G37* |
G74* |
* |
* |
G04 PC Copper Outlines (13)* |
G04 Layer Name GMC01A.pcb - dark (13)* |
%LPD*% |
* |
* |
G04 PC Area=CFC5* |
G75* |
G36* |
G01* |
X378494Y153740D02* |
X376494D01* |
Y135540D01* |
X378494D01* |
Y153740D01* |
G37* |
G74* |
* |
* |
G04 PC Copper Outlines (14)* |
G04 Layer Name GMC01A.pcb - dark (14)* |
%LPD*% |
* |
* |
G04 PC Area=CFC6* |
G75* |
G36* |
G01* |
X372894Y148940D02* |
X370994D01* |
Y130740D01* |
X372894D01* |
Y148940D01* |
G37* |
G74* |
* |
* |
G04 PC Copper Outlines (15)* |
G04 Layer Name GMC01A.pcb - dark (15)* |
%LPD*% |
* |
* |
G04 PC Area=CFC7* |
G75* |
G36* |
G01* |
X294194Y148940D02* |
X292294D01* |
Y130740D01* |
X294194D01* |
Y148940D01* |
G37* |
G74* |
* |
* |
G04 PC Copper Outlines (16)* |
G04 Layer Name GMC01A.pcb - dark (16)* |
%LPD*% |
* |
* |
G04 PC Area=CFC8* |
G75* |
G36* |
G01* |
X299794Y153740D02* |
X297794D01* |
Y135540D01* |
X299794D01* |
Y153740D01* |
G37* |
G74* |
* |
* |
G04 PC Copper Outlines (17)* |
G04 Layer Name GMC01A.pcb - dark (17)* |
%LPD*% |
* |
* |
G04 PC Area=CFC9* |
G75* |
G36* |
G01* |
X316494Y148940D02* |
X314594D01* |
Y130740D01* |
X316494D01* |
Y148940D01* |
G37* |
G74* |
* |
* |
G04 PC Copper Outlines (18)* |
G04 Layer Name GMC01A.pcb - dark (18)* |
%LPD*% |
* |
* |
G04 PC Area=CFC10* |
G75* |
G36* |
G01* |
X310994Y153740D02* |
X308994D01* |
Y135540D01* |
X310994D01* |
Y153740D01* |
G37* |
G74* |
* |
* |
G04 PC Copper Outlines (19)* |
G04 Layer Name GMC01A.pcb - dark (19)* |
%LPD*% |
* |
* |
G04 PC Area=CFC11* |
G75* |
G36* |
G01* |
X305394Y148940D02* |
X303394D01* |
Y125240D01* |
X305394D01* |
Y148940D01* |
G37* |
G74* |
* |
* |
G04 PC Copper Outlines (20)* |
G04 Layer Name GMC01A.pcb - dark (20)* |
%LPD*% |
* |
* |
G04 PC Area=CFC12* |
G75* |
G36* |
G01* |
X316494Y131740D02* |
X292294D01* |
Y130140D01* |
X316494D01* |
Y131740D01* |
G37* |
G74* |
* |
* |
G04 PC Copper Outlines (21)* |
G04 Layer Name GMC01A.pcb - dark (21)* |
%LPD*% |
* |
* |
G04 PC Area=CFC13* |
G75* |
G36* |
G01* |
X316494Y154340D02* |
X292294D01* |
Y152740D01* |
X316494D01* |
Y154340D01* |
G37* |
G74* |
* |
* |
G04 PC Copper Outlines (22)* |
G04 Layer Name GMC01A.pcb - dark (22)* |
%LPD*% |
* |
* |
G04 PC Area=CFC14* |
G75* |
G36* |
G01* |
X451594Y148940D02* |
X449694D01* |
Y130740D01* |
X451594D01* |
Y148940D01* |
G37* |
G74* |
* |
* |
G04 PC Copper Outlines (23)* |
G04 Layer Name GMC01A.pcb - dark (23)* |
%LPD*% |
* |
* |
G04 PC Area=CFC15* |
G75* |
G36* |
G01* |
X457194Y153740D02* |
X455194D01* |
Y135540D01* |
X457194D01* |
Y153740D01* |
G37* |
G74* |
* |
* |
G04 PC Copper Outlines (24)* |
G04 Layer Name GMC01A.pcb - dark (24)* |
%LPD*% |
* |
* |
G04 PC Area=CFC16* |
G75* |
G36* |
G01* |
X473894Y148940D02* |
X471994D01* |
Y130740D01* |
X473894D01* |
Y148940D01* |
G37* |
G74* |
* |
* |
G04 PC Copper Outlines (25)* |
G04 Layer Name GMC01A.pcb - dark (25)* |
%LPD*% |
* |
* |
G04 PC Area=CFC17* |
G75* |
G36* |
G01* |
X468394Y153740D02* |
X466394D01* |
Y135540D01* |
X468394D01* |
Y153740D01* |
G37* |
G74* |
* |
* |
G04 PC Copper Outlines (26)* |
G04 Layer Name GMC01A.pcb - dark (26)* |
%LPD*% |
* |
* |
G04 PC Area=CFC18* |
G75* |
G36* |
G01* |
X462794Y148940D02* |
X460794D01* |
Y125240D01* |
X462794D01* |
Y148940D01* |
G37* |
G74* |
* |
* |
G04 PC Copper Outlines (27)* |
G04 Layer Name GMC01A.pcb - dark (27)* |
%LPD*% |
* |
* |
G04 PC Area=CFC19* |
G75* |
G36* |
G01* |
X473894Y131740D02* |
X449694D01* |
Y130140D01* |
X473894D01* |
Y131740D01* |
G37* |
G74* |
* |
* |
G04 PC Copper Outlines (28)* |
G04 Layer Name GMC01A.pcb - dark (28)* |
%LPD*% |
* |
* |
G04 PC Area=CFC20* |
G75* |
G36* |
G01* |
X473894Y154340D02* |
X449694D01* |
Y152740D01* |
X473894D01* |
Y154340D01* |
G37* |
G74* |
* |
* |
G04 PC Copper Outlines (29)* |
G04 Layer Name GMC01A.pcb - dark (29)* |
%LPD*% |
* |
* |
G04 PC Area=CFC21* |
G75* |
G36* |
G01* |
X384094Y159240D02* |
X382094D01* |
Y154840D01* |
X384094D01* |
Y159240D01* |
G37* |
G74* |
* |
* |
G04 PC Copper Outlines (30)* |
G04 Layer Name GMC01A.pcb - dark (30)* |
%LPD*% |
* |
* |
G04 PC Area=CFC22* |
G75* |
G36* |
G01* |
X305394Y159540D02* |
X303394D01* |
Y154740D01* |
X305394D01* |
Y159540D01* |
G37* |
G74* |
* |
* |
G04 PC Copper Outlines (31)* |
G04 Layer Name GMC01A.pcb - dark (31)* |
%LPD*% |
* |
* |
G04 PC Area=CFC23* |
G75* |
G36* |
G01* |
X462794Y159240D02* |
X460794D01* |
Y154540D01* |
X462794D01* |
Y159240D01* |
G37* |
G74* |
* |
* |
G04 PC Copper Outlines (32)* |
G04 Layer Name GMC01A.pcb - dark (32)* |
%LPD*% |
* |
* |
G04 PC Area=Custom_Thermal* |
* |
G04 PC Custom Flashes* |
G04 Layer Name GMC01A.pcb - flashes* |
%LPD*% |
* |
* |
G04 PC Circuitry* |
G04 Layer Name GMC01A.pcb - circuitry* |
%LPD*% |
* |
G54D10* |
G01X376632Y361163D02* |
Y362863D01* |
X384232Y361163D02* |
Y362863D01* |
X379563Y353236D02* |
Y354936D01* |
X387163Y353236D02* |
Y354936D01* |
X421709Y363911D02* |
Y362211D01* |
X414109Y363911D02* |
Y362211D01* |
X421709Y356201D02* |
Y354501D01* |
X414109Y356201D02* |
Y354501D01* |
X589295Y193878D02* |
X590995D01* |
X589295Y186278D02* |
X590995D01* |
X590697Y260637D02* |
X592397D01* |
X590697Y253037D02* |
X592397D01* |
X582987Y260637D02* |
X584687D01* |
X582987Y253037D02* |
X584687D01* |
X589545Y179685D02* |
X590745D01* |
X589545Y172085D02* |
X590745D01* |
X225613Y360611D02* |
X226813D01* |
X225613Y353011D02* |
X226813D01* |
X585500Y269754D02* |
Y268554D01* |
X577900Y269754D02* |
Y268554D01* |
X623762Y273560D02* |
X622562D01* |
X623762Y281160D02* |
X622562D01* |
X392031Y304913D02* |
Y306613D01* |
X399631Y304913D02* |
Y306613D01* |
G54D11* |
X246857Y359854D03* |
X236857D03* |
X216857D03* |
X206857D03* |
X585703Y291862D03* |
X615703D03* |
Y281862D03* |
X301693Y359854D03* |
X311693D03* |
X321693D03* |
X331693D03* |
X341693D03* |
X351693D03* |
X313339Y346780D03* |
X323339D03* |
X333339D03* |
X343339D03* |
X353339D03* |
X363339D03* |
X373339D03* |
X383339D03* |
X393339D03* |
X403339D03* |
X413339D03* |
X423339D03* |
X433339D03* |
Y316780D03* |
X423339D03* |
X413339D03* |
X403339D03* |
X393339D03* |
X383339D03* |
X373339D03* |
X363339D03* |
X353339D03* |
X343339D03* |
X333339D03* |
X323339D03* |
X313339D03* |
X303339D03* |
G54D12* |
X254000Y302500D03* |
G54D13* |
X163490Y348270D03* |
Y131730D03* |
X596510Y348270D03* |
Y131730D03* |
G54D17* |
X304354Y122240D02* |
Y112039D01* |
X512755* |
X550169Y149159* |
Y331055* |
X383094Y122240D02* |
Y116166D01* |
X509729* |
X546593Y153343* |
X461834Y122240D02* |
X508354Y122218D01* |
X543291Y157068* |
X304354Y162240D02* |
X383094D01* |
X461834* |
X462094Y162500* |
X515000* |
X582500D02* |
X616517D01* |
X618301Y160716* |
X590145Y172085D02* |
X613056D01* |
X628383Y187411* |
X579632Y172013D02* |
X579704Y172085D01* |
X590145* |
X618301Y160716D02* |
X631964Y174379D01* |
Y230564* |
X590145Y179685D02* |
X590177Y179716D01* |
X599301* |
X590145Y179685D02* |
Y186278D01* |
X579632Y185013D02* |
Y190378D01* |
X583132Y193878* |
X590145* |
X579632Y185013D02* |
X581281D01* |
X607301Y179716D02* |
X618301Y190716D01* |
Y208716* |
X599301Y189716D02* |
Y196563D01* |
X602524Y199786* |
Y232484* |
X559481Y234020D02* |
Y255085D01* |
X573674Y269278* |
X577775* |
X577900Y269154* |
X571171Y253343D02* |
X578355Y260527D01* |
X583727* |
X583837Y260637* |
X602920Y238792D02* |
X607301Y234411D01* |
Y189716* |
X577900Y269154D02* |
Y294527D01* |
X577919Y317426* |
X585500Y269154D02* |
Y281658D01* |
X585703Y281862* |
X583837Y260637D02* |
X591547D01* |
X591553Y260643* |
X591547Y260637D02* |
X601891D01* |
X631964Y230564* |
X599646Y256799D02* |
X628383Y228413D01* |
Y187411* |
X623162Y273560D02* |
X625409Y271313D01* |
X632664* |
X585703Y291862D02* |
X591553Y286012D01* |
Y260643* |
X615703Y281862D02* |
X632481D01* |
X632664Y281679* |
X615703Y291862D02* |
X632481D01* |
X632664Y292045* |
X623162Y281160D02* |
Y281430D01* |
X623594Y281862* |
X632481* |
X632664Y281679* |
X254000Y302500D02* |
Y334912D01* |
X257500Y338412* |
X294473* |
X264000Y302500D02* |
X264061Y293859D01* |
X283840Y309979D02* |
X284000Y309819D01* |
Y302500* |
X246828Y316718D02* |
X246857D01* |
Y359854* |
X260192Y330506D02* |
Y313607D01* |
X263692Y310107* |
X266393* |
X274000Y302500* |
X260192Y330506D02* |
X263709Y333001D01* |
X318909* |
X325017Y339110* |
X464694* |
X474867Y349283* |
X267263Y316716D02* |
X274161Y323666D01* |
X299839* |
X303339Y320199* |
Y316780* |
X267121Y326028D02* |
X268049Y328607D01* |
X304190* |
X313339Y316780* |
X293803Y316747D02* |
X294000Y315747D01* |
Y302500* |
X303339Y316780D02* |
Y303161D01* |
X304000Y302500* |
X313339Y316780D02* |
X331292Y334555D01* |
X529317* |
X546669* |
X550169Y331055* |
X323339Y316780D02* |
X337069Y330153D01* |
X526531* |
X543361Y330186* |
X546593Y326686* |
Y153343* |
X333339Y316780D02* |
X341746Y325331D01* |
X539791* |
X543291Y321831* |
Y157068* |
X343339Y316780D02* |
Y313161D01* |
X354000Y302500* |
X353339Y316780D02* |
Y313161D01* |
X364000Y302500* |
X363339Y316780D02* |
Y313161D01* |
X374000Y302500* |
X373339Y316780D02* |
Y313161D01* |
X384000Y302500* |
X383339Y316780D02* |
X391363Y306554D01* |
X393339Y316780D02* |
X399631Y310487D01* |
Y305763* |
X403339Y316780D02* |
X410000Y310118D01* |
Y309979* |
X413339Y316780D02* |
X426152Y303967D01* |
X464006* |
X477539Y317500* |
X515000* |
X423339Y316780D02* |
X430538Y309581D01* |
X457160* |
Y316491* |
X433339Y316780D02* |
X446074D01* |
X446363Y316491* |
X553671Y323606D02* |
Y204631D01* |
X572420Y185882* |
X578763* |
X579632Y185013* |
X553671Y323606D02* |
Y324238D01* |
X553754Y324931* |
X582203Y324886* |
X585703Y321386* |
Y291862* |
X202055Y337278D02* |
Y176726D01* |
X216740Y162041* |
X304155* |
X304354Y162240* |
X202055Y337278D02* |
X216857Y352079D01* |
Y359854* |
X236857Y352972D02* |
Y318047D01* |
X245662Y309241* |
Y297359* |
X249162Y293859* |
X264061* |
X236857Y352972D02* |
Y318047D01* |
X245662Y309241* |
Y297359* |
X249162Y293859* |
X388531* |
X392031Y297359* |
Y305763* |
X236876Y352475D02* |
X237329D01* |
X226213Y353011D02* |
X236818D01* |
X236857Y352972* |
Y359854* |
X294473Y338412D02* |
X317463D01* |
X323339Y346780* |
X293692Y338510D02* |
Y338939D01* |
X294473Y338412* |
X291693Y352475D02* |
Y359854D01* |
X373339Y346780D02* |
Y362155D01* |
X376490* |
X376632Y362013* |
X393339Y346780D02* |
Y350849D01* |
X397749Y355260* |
X383339Y346780D02* |
Y361120D01* |
X384232Y362013* |
X387163Y354086D02* |
X393339Y347911D01* |
Y346780* |
X409043Y355260D02* |
X414018D01* |
X414109Y355351* |
X413339Y346780D02* |
Y354580D01* |
X414109Y355351* |
X403339Y346780D02* |
Y356355D01* |
X409043Y362060* |
X423339Y346780D02* |
X429632Y353073D01* |
X440556* |
X446295Y347333* |
X457112* |
X474867Y349283D02* |
X476859Y347291D01* |
X484854* |
X484897Y347333* |
X206857Y359854D02* |
Y366332D01* |
X226242* |
X206857Y359854D02* |
Y365792D01* |
X273941* |
X277441Y362292* |
Y348791* |
X280941Y345291* |
X301854* |
X303339Y346780* |
X226213Y360611D02* |
Y366303D01* |
X226242Y366332* |
X236857Y352972D02* |
Y359854D01* |
Y352972* |
X237329Y352475* |
X256857Y359854D02* |
Y355201D01* |
X267121Y344937* |
X301693Y359854D02* |
Y358425D01* |
X313339Y346780* |
X331693Y359854D02* |
X343339Y348208D01* |
Y346780* |
X321693Y359854D02* |
Y358425D01* |
X333339Y346780* |
X351693Y359854D02* |
X353995Y362155D01* |
X360249* |
X341693Y359854D02* |
Y358425D01* |
X353339Y346780* |
X360249Y362155D02* |
X376490D01* |
X376632Y362013* |
X360249Y362155D02* |
Y358660D01* |
X373339Y362155D02* |
Y354086D01* |
X379563* |
X373339Y362155D02* |
X376490D01* |
X376632Y362013* |
Y364788* |
X380132Y368288* |
X481397* |
X484897Y364788* |
Y360333* |
X384232Y362013D02* |
X397702D01* |
X397749Y362060* |
X421709Y355351D02* |
Y363061D01* |
Y368288* |
X446543* |
X481397* |
X484897Y364788* |
Y360333* |
X446543Y368288D02* |
Y358660D01* |
X457112Y360333D02* |
X464162Y353283D01* |
X466867* |
X474867Y357283D02* |
X477665Y360082D01* |
X484645* |
X484897Y360333* |
X550171* |
X553671Y356833* |
Y323606* |
G54D19* |
X193849Y366631D02* |
Y174566D01* |
X261970Y106537* |
X532838* |
X562548Y136248* |
Y154929* |
X579632Y172013* |
X193849Y366631D02* |
X199099Y371881D01* |
X299666* |
X311693Y359854* |
G54D20* |
X559481Y234020D02* |
X567581Y226135D01* |
X571621* |
X573721Y224035* |
Y216907* |
X571171D02* |
Y212610D01* |
X573271Y210510* |
X597443* |
X599543Y212610* |
Y229362* |
X578821Y216907D02* |
X578886D01* |
X570984Y244907D02* |
Y233708D01* |
X573084Y231608* |
X578821* |
Y216907* |
X571171Y244907D02* |
X570984D01* |
Y233708* |
X573084Y231608* |
X578821* |
Y231958* |
X586921* |
X589021Y234058* |
Y244907* |
X570984D02* |
Y233708D01* |
X573084Y231608* |
X578821* |
Y231958* |
X581371* |
Y244907* |
X568621D02* |
X571171D01* |
Y253343* |
X594113Y240895D02* |
Y244900D01* |
X594121Y244907* |
X594113Y240895D02* |
X602524Y232484D01* |
X583921Y244907D02* |
X586471D01* |
X591571D02* |
Y237334D01* |
X599543Y229362* |
X596671Y244907D02* |
X602786Y238792D01* |
X602920* |
X583837Y253037D02* |
Y256799D01* |
X599646* |
X583837Y253037D02* |
X583921Y252954D01* |
Y244907* |
X591547Y253037D02* |
X591571Y253014D01* |
Y244907* |
G54D22* |
X515000Y162500D03* |
X582500D03* |
X246828Y316718D03* |
X267263Y316716D03* |
X267121Y326028D03* |
X293803Y316747D03* |
X515000Y317500D03* |
X577919Y317426D03* |
X236876Y352475D03* |
X267121Y344937D03* |
X293692Y338510D03* |
X291693Y352475D03* |
X283840Y309979D03* |
X410000D03* |
G54D25* |
X360518Y179998D02* |
X360291Y180623D01* |
X359836Y181248* |
X359382Y181561* |
X358473* |
X358018Y181248* |
X357564Y180623* |
X357336Y179998* |
X357109Y179061* |
Y177498* |
X357336Y176561* |
X357564Y175936* |
X358018Y175311* |
X358473Y174998* |
X359382* |
X359836Y175311* |
X360291Y175936* |
X360518Y176561* |
Y177498* |
X359382D02* |
X360518D01* |
X362564Y181561D02* |
Y174998D01* |
Y181561D02* |
X364382Y174998D01* |
X366200Y181561D02* |
X364382Y174998D01* |
X366200Y181561D02* |
Y174998D01* |
X371655Y179998D02* |
X371427Y180623D01* |
X370973Y181248* |
X370518Y181561* |
X369609* |
X369155Y181248* |
X368700Y180623* |
X368473Y179998* |
X368245Y179061* |
Y177498* |
X368473Y176561* |
X368700Y175936* |
X369155Y175311* |
X369609Y174998* |
X370518* |
X370973Y175311* |
X371427Y175936* |
X371655Y176561* |
X375064Y181561D02* |
X374382Y181248D01* |
X373927Y180311* |
X373700Y178748* |
Y177811* |
X373927Y176248* |
X374382Y175311* |
X375064Y174998* |
X375518* |
X376200Y175311* |
X376655Y176248* |
X376882Y177811* |
Y178748* |
X376655Y180311* |
X376200Y181248* |
X375518Y181561* |
X375064* |
X378927Y180311D02* |
X379382Y180623D01* |
X380064Y181561* |
Y174998* |
X383927Y181561D02* |
X382109Y174998D01* |
X383927Y181561D02* |
X385745Y174998D01* |
X382791Y177186D02* |
X385064D01* |
X284976Y361642D02* |
X285430Y361955D01* |
X286112Y362892* |
Y356330* |
X262723Y361467D02* |
X263177Y361779D01* |
X263859Y362717* |
Y356154* |
X562177Y209199D02* |
X562632Y209511D01* |
X563314Y210449* |
X563314D02* |
Y203886D01* |
X370994Y154340D02* |
X395194D01* |
Y152740* |
X370994* |
Y154340* |
Y130140D02* |
X395194D01* |
Y131740* |
X370994* |
Y130140* |
X382094Y148940D02* |
X383994D01* |
Y125240* |
X382094* |
Y148940* |
X387694Y153740D02* |
X389694D01* |
Y135540* |
X387694* |
Y153740* |
X393294Y130740D02* |
X395194D01* |
Y148940* |
X393294* |
Y130740* |
X378494Y153740D02* |
X376494D01* |
Y135540* |
X378494* |
Y153740* |
X372894Y130740D02* |
X370994D01* |
Y148940* |
X372894* |
Y130740* |
X294194D02* |
X292294D01* |
Y148940* |
X294194* |
Y130740* |
X299794Y153740D02* |
X297794D01* |
Y135540* |
X299794* |
Y153740* |
X314594Y130740D02* |
X316494D01* |
Y148940* |
X314594* |
Y130740* |
X308994Y153740D02* |
X310994D01* |
Y135540* |
X308994* |
Y153740* |
X303394Y148940D02* |
X305394D01* |
Y125240* |
X303394* |
Y148940* |
X292294Y130140D02* |
X316494D01* |
Y131740* |
X292294* |
Y130140* |
Y154340D02* |
X316494D01* |
Y152740* |
X292294* |
Y154340* |
X451594Y130740D02* |
X449694D01* |
Y148940* |
X451594* |
Y130740* |
X457194Y153740D02* |
X455194D01* |
Y135540* |
X457194* |
Y153740* |
X471994Y130740D02* |
X473894D01* |
Y148940* |
X471994* |
Y130740* |
X466394Y153740D02* |
X468394D01* |
Y135540* |
X466394* |
Y153740* |
X460794Y148940D02* |
X462794D01* |
Y125240* |
X460794* |
Y148940* |
X449694Y130140D02* |
X473894D01* |
Y131740* |
X449694* |
Y130140* |
Y154340D02* |
X473894D01* |
Y152740* |
X449694* |
Y154340* |
X382094Y154840D02* |
X384094D01* |
Y159240* |
X382094* |
Y154840* |
X303394Y159540D02* |
X305394D01* |
Y154740* |
X303394* |
Y159540* |
X460794Y159240D02* |
X462794D01* |
Y154540* |
X460794* |
Y159240* |
X648600Y152950D02* |
Y233045D01* |
G75* |
G03X648100Y233545I-500J0D01* |
G01X634401* |
X634047Y233692D02* |
G03X634401Y233545I354J353D01* |
G01X634047Y233692D02* |
X599850Y267889D01* |
X599703Y268243D02* |
G03X599850Y267889I500J-0D01* |
G01X599703Y268243D02* |
Y332008D01* |
X600203Y332508D02* |
G03X599703Y332008I0J-500D01* |
G01X600203Y332508D02* |
X610700D01* |
G03X611200Y333008I-0J500* |
G01Y342519* |
G03X610237Y342707I-500J0* |
G01Y353833D02* |
G03Y342707I-13727J-5563D01* |
G01Y353833D02* |
G03X611200Y354021I463J188D01* |
G01Y374250* |
G03X610700Y374750I-500J-0* |
G01X304368* |
G03X304014Y373896I-0J-500* |
G01X311938Y365972* |
G03X312246Y365828I354J354* |
G01X316308Y363687D02* |
G03X312246Y365828I-4615J-3833D01* |
G01X316308Y363687D02* |
G03X317077I385J320D01* |
G01X326308D02* |
G03X317077I-4615J-3833D01* |
G01X326308D02* |
G03X327077I385J320D01* |
G01X336308D02* |
G03X327077I-4615J-3833D01* |
G01X336308D02* |
G03X337077I385J320D01* |
G01X347550Y358553D02* |
G03X337077Y363687I-5857J1301D01* |
G01X347550Y358553D02* |
G03X347685Y358091I488J-109D01* |
G01X352850Y352925* |
G03X353214Y352779I354J353* |
G01X357954Y350614D02* |
G03X353214Y352779I-4615J-3834D01* |
G01X357954Y350614D02* |
G03X358723I385J319D01* |
G01X368577Y343854D02* |
G03X358723Y350614I-5238J2926D01* |
G01X368577Y343854D02* |
G03X369013Y343110I436J-244D01* |
G01X377664* |
G03X378100Y343854I-0J500* |
G01X377421Y347771D02* |
G03X378100Y343854I5918J-991D01* |
G01X377421Y347772D02* |
G03X377026Y348344I-493J82D01* |
G01X374613Y351286D02* |
G03X377026Y348344I3000J0D01* |
G01X374613Y351286D02* |
Y355760D01* |
G03X374194Y356253I-500J-0* |
G01X371682Y359213D02* |
G03X374194Y356253I3000J0D01* |
G01X371682Y359213D02* |
Y364813D01* |
X374682Y367813D02* |
G03X371682Y364813I-0J-3000D01* |
G01X374682Y367813D02* |
X378582D01* |
X380168Y367360D02* |
G03X378582Y367813I-1586J-2547D01* |
G01X380168Y367360D02* |
G03X380696I264J424D01* |
G01X382282Y367813D02* |
G03X380696Y367360I-0J-3000D01* |
G01X382282Y367813D02* |
X386182D01* |
X388804Y366270D02* |
G03X386182Y367813I-2622J-1457D01* |
G01X388804Y366270D02* |
G03X389241Y366013I437J243D01* |
G01X394112* |
G03X394428Y366126I-0J500* |
G01X402905Y363048D02* |
G03X394428Y366126I-5156J-988D01* |
G01X402905Y363048D02* |
G03X403887I491J94D01* |
G01X409232Y367306D02* |
G03X403887Y363048I-189J-5246D01* |
G01X409232Y367306D02* |
G03X409665Y367528I18J500D01* |
G01X412159Y368861D02* |
G03X409665Y367528I0J-3000D01* |
G01X412159Y368861D02* |
X416059D01* |
X417645Y368407D02* |
G03X416059Y368861I-1586J-2546D01* |
G01X417645Y368407D02* |
G03X418174I264J425D01* |
G01X419759Y368861D02* |
G03X418174Y368407I0J-3000D01* |
G01X419759Y368861D02* |
X423659D01* |
X426659Y365861D02* |
G03X423659Y368861I-3000J-0D01* |
G01X426659Y365861D02* |
Y360261D01* |
X426520Y359356D02* |
G03X426659Y360261I-2861J905D01* |
G01X426520Y359356D02* |
G03Y359055I477J-150D01* |
G01X426659Y358151D02* |
G03X426520Y359055I-3000J-0D01* |
G01X426659Y358151D02* |
Y356833D01* |
G03X427434Y356415I500J-0* |
G01X429632Y357073D02* |
G03X427434Y356415I-0J-4000D01* |
G01X429632Y357073D02* |
X440556D01* |
X443384Y355901D02* |
G03X440556Y357073I-2828J-2828D01* |
G01X443384Y355901D02* |
X447806Y351480D01* |
G03X448159Y351333I353J353* |
G01X449081* |
G03X449514Y351583I-0J500* |
G01X452112Y353083D02* |
G03X449514Y351583I-0J-3000D01* |
G01X452112Y353083D02* |
X457498D01* |
G03X457851Y353937I-0J500* |
G01X457351Y354437* |
G03X456998Y354583I-353J-354* |
G01X452112* |
X449112Y357583D02* |
G03X452112Y354583I3000J0D01* |
G01X449112Y357583D02* |
Y363083D01* |
X452112Y366083D02* |
G03X449112Y363083I-0J-3000D01* |
G01X452112Y366083D02* |
X462112D01* |
X465112Y363083D02* |
G03X462112Y366083I-3000J0D01* |
G01X465112Y363083D02* |
Y358783D01* |
G03X465612Y358283I500J0* |
G01X468867* |
X469295Y358252D02* |
G03X468867Y358283I-428J-2969D01* |
G01X469295Y358252D02* |
G03X469867Y358747I72J495D01* |
G01Y359283* |
X472867Y362283D02* |
G03X469867Y359283I-0J-3000D01* |
G01X472867Y362283D02* |
X476397D01* |
G03X476897Y362783I-0J500* |
G01Y363083* |
X479897Y366083D02* |
G03X476897Y363083I-0J-3000D01* |
G01X479897Y366083D02* |
X489897D01* |
X492897Y363083D02* |
G03X489897Y366083I-3000J0D01* |
G01X492897Y363083D02* |
Y357583D01* |
X489897Y354583D02* |
G03X492897Y357583I-0J3000D01* |
G01X489897Y354583D02* |
X480155D01* |
G03X479685Y354255I-0J-500* |
G01X479489Y353826D02* |
G03X479685Y354255I-2622J1457D01* |
G01X479489Y353826D02* |
G03X479926Y353083I437J-243D01* |
G01X489897* |
X492897Y350083D02* |
G03X489897Y353083I-3000J0D01* |
G01X492897Y350083D02* |
Y344583D01* |
X489897Y341583D02* |
G03X492897Y344583I-0J3000D01* |
G01X489897Y341583D02* |
X479897D01* |
X477320Y343047D02* |
G03X479897Y341583I2577J1536D01* |
G01X477320Y343047D02* |
G03X476891Y343291I-429J-256D01* |
G01X476859* |
X475293Y343610D02* |
G03X476859Y343291I1566J3681D01* |
G01X475293Y343610D02* |
G03X474744Y343503I-196J-460D01* |
G01X470649Y339409* |
G03X471002Y338555I353J-354* |
G01X529317* |
X546669* |
X549497Y337383D02* |
G03X546669Y338555I-2828J-2828D01* |
G01X549497Y337383D02* |
X552997Y333883D01* |
X554169Y331055D02* |
G03X552997Y333883I-4000J0D01* |
G01X554169Y331055D02* |
Y149159D01* |
X552986Y146319D02* |
G03X554169Y149159I-2817J2840D01* |
G01X552986Y146319D02* |
X518287Y111892D01* |
G03X518639Y111037I352J-355* |
G01X530766* |
X530766D02* |
G03X531120Y111184I0J500D01* |
G01X557902Y137966* |
G03X558048Y138319I-354J353* |
G01Y154929* |
X559366Y158111D02* |
G03X558048Y154929I3182J-3182D01* |
G01X559366Y158111D02* |
X571486Y170231D01* |
G03X571632Y170584I-354J353* |
G01Y174763* |
X574632Y177763D02* |
G03X571632Y174763I0J-3000D01* |
G01X574632Y177763D02* |
X584095D01* |
G03X584595Y178263I0J500* |
G01Y178763* |
G03X584095Y179263I-500J-0* |
G01X574632* |
X571632Y182263D02* |
G03X574632Y179263I3000J0D01* |
G01X571632Y182263D02* |
Y187763D01* |
X574632Y190763D02* |
G03X571632Y187763I0J-3000D01* |
G01X574632Y190763D02* |
X583909D01* |
G03X584400Y191358I-0J500* |
G01X584345Y191928D02* |
G03X584400Y191358I3000J-0D01* |
G01X584345Y191928D02* |
Y195828D01* |
X587345Y198828D02* |
G03X584345Y195828I0J-3000D01* |
G01X587345Y198828D02* |
X592945D01* |
X594903Y198101D02* |
G03X592945Y198828I-1958J-2273D01* |
G01X594903Y198101D02* |
G03X595682Y198267I326J379D01* |
G01X596473Y199392D02* |
G03X595682Y198267I2828J-2829D01* |
G01X596473Y199392D02* |
X598378Y201297D01* |
G03X598524Y201650I-354J353* |
G01Y206451* |
G03X597953Y206946I-500J0* |
G01X597443Y206910D02* |
G03X597953Y206946I-0J3600D01* |
G01X597443Y206910D02* |
X573271D01* |
X570725Y207964D02* |
G03X573271Y206910I2546J2546D01* |
G01X570725Y207964D02* |
X570096Y208594D01* |
G03X569742Y208740I-354J-354* |
G01X566923* |
G03X566423Y208240I-0J-500* |
G01Y201199* |
X564723Y199499D02* |
G03X566423Y201199I-0J1700D01* |
G01X564723Y199499D02* |
X561677D01* |
X559977Y201199D02* |
G03X561677Y199499I1700J-0D01* |
G01X559977Y201199D02* |
Y208241D01* |
G03X559501Y208741I-500J0* |
G01X559025Y209240D02* |
G03X559501Y208741I500J0D01* |
G01X559025Y209240D02* |
Y229230D01* |
G03X558874Y229588I-500J-0* |
G01X558299Y230147* |
G03X558121Y230259I-349J-358* |
G01X555481Y234020D02* |
G03X558121Y230259I4000J0D01* |
G01X555481Y234020D02* |
Y255085D01* |
X556653Y257913D02* |
G03X555481Y255085I2828J-2828D01* |
G01X556653Y257913D02* |
X570846Y272106D01* |
X573168Y273246D02* |
G03X570846Y272106I506J-3968D01* |
G01X573168Y273246D02* |
G03X573511Y273451I-64J496D01* |
G01X573764Y273759D02* |
G03X573511Y273451I2186J-2055D01* |
G01X573764Y273759D02* |
G03X573900Y274101I-364J342D01* |
G01Y294527* |
Y294526* |
Y294530* |
X573900* |
X573915Y313092* |
Y313093* |
G03X573775Y313439I-500J-0* |
G01X582055Y313432D02* |
G03X573775Y313439I-4136J3994D01* |
G01X582055Y313432D02* |
G03X581915Y313085I360J-347D01* |
G01X581900Y294526* |
X581900* |
Y288348* |
G03X582443Y287850I500J0* |
G01X582703Y287862D02* |
G03X582443Y287850I0J-3000D01* |
G01X582703Y287862D02* |
X588703D01* |
X591703Y284862D02* |
G03X588703Y287862I-3000J-0D01* |
G01X591703Y284862D02* |
Y278862D01* |
X589814Y276075D02* |
G03X591703Y278862I-1111J2787D01* |
G01X589814Y276075D02* |
G03X589500Y275611I186J-464D01* |
G01Y274101* |
G03X589635Y273759I500J-0* |
G01X590450Y271704D02* |
G03X589635Y273759I-3000J-0D01* |
G01X590450Y271704D02* |
Y266604D01* |
X590417Y266161D02* |
G03X590450Y266604I-2967J443D01* |
G01X590417Y266161D02* |
G03X590911Y265587I494J-74D01* |
G01X594347* |
X597347Y262587D02* |
G03X594347Y265587I-3000J0D01* |
G01X597347Y262587D02* |
Y260924D01* |
G03X598047Y260466I500J-0* |
G01X602457Y259645D02* |
G03X598047Y260466I-2811J-2846D01* |
G01X602457Y259645D02* |
X606347Y255803D01* |
G03X606699Y255658I352J355* |
G01X608034* |
X608534Y255158D02* |
G03X608034Y255658I-500J0D01* |
G01X608534Y255158D02* |
Y253851D01* |
G03X608683Y253495I500J0* |
G01X631194Y231259* |
X632383Y228413D02* |
G03X631194Y231259I-4000J0D01* |
G01X632383Y228413D02* |
Y187411D01* |
X631211Y184583D02* |
G03X632383Y187411I-2828J2828D01* |
G01X631211Y184583D02* |
X615885Y169256D01* |
X613056Y168085D02* |
G03X615885Y169256I0J4000D01* |
G01X613056Y168085D02* |
X595093D01* |
G03X594750Y167949I-0J-500* |
G01X592695Y167135D02* |
G03X594750Y167949I0J3000D01* |
G01X592695Y167135D02* |
X587595D01* |
X587085Y167178D02* |
G03X587595Y167135I510J2957D01* |
G01X587085Y167178D02* |
G03X586662Y167054I-85J-492D01* |
G01X584632Y166263D02* |
G03X586662Y167054I0J3000D01* |
G01X584632Y166263D02* |
X580453D01* |
G03X580100Y166117I0J-500* |
G01X567195Y153212* |
G03X567048Y152858I353J-354* |
G01Y136248* |
X565730Y133066D02* |
G03X567048Y136248I-3182J3182D01* |
G01X565730Y133066D02* |
X538768Y106104D01* |
G03X539121Y105250I353J-354* |
G01X610700* |
G03X611200Y105750I-0J500* |
G01Y125979* |
G03X610237Y126167I-500J0* |
G01Y137293D02* |
G03Y126167I-13727J-5563D01* |
G01Y137293D02* |
G03X611200Y137481I463J188D01* |
G01Y149450* |
X614200Y152450D02* |
G03X611200Y149450I0J-3000D01* |
G01X614200Y152450D02* |
X648100D01* |
G03X648600Y152950I-0J500* |
G01X299882Y111037D02* |
G03X300379Y111593I-0J500D01* |
G01X300354Y112039D02* |
G03X300379Y111593I4000J0D01* |
G01X300354Y112039D02* |
Y116078D01* |
G03X300068Y116529I-500J-0* |
G01X298354Y119240D02* |
G03X300068Y116529I3000J-0D01* |
G01X298354Y119240D02* |
Y125240D01* |
X298455Y126011D02* |
G03X298354Y125240I2899J-771D01* |
G01X298455Y126011D02* |
G03X297972Y126640I-483J129D01* |
G01X292294* |
X288794Y130140D02* |
G03X292294Y126640I3500J-0D01* |
G01X288794Y130140D02* |
Y130740D01* |
Y148940* |
X289214Y150602D02* |
G03X288794Y148940I3080J-1662D01* |
G01X289214Y150602D02* |
G03Y151077I-440J238D01* |
G01X288794Y152740D02* |
G03X289214Y151077I3500J-0D01* |
G01X288794Y152740D02* |
Y154340D01* |
X292294Y157840D02* |
G03X288794Y154340I-0J-3500D01* |
G01X292294Y157840D02* |
X297972D01* |
G03X298455Y158468I-0J500* |
G01X298354Y159240D02* |
G03X298455Y158468I3000J-0D01* |
G01X298354Y159240D02* |
Y165240D01* |
X298874Y166928D02* |
G03X298354Y165240I2480J-1688D01* |
G01X298874Y166928D02* |
G03X298461Y167709I-413J281D01* |
G01X246475* |
G03X246092Y167531I-0J-500* |
G01X220246Y192490D02* |
G03X246092Y167531I12050J-13383D01* |
G01X220246Y192490D02* |
G03X220411Y192861I-335J371D01* |
G01Y286298* |
G03X220237Y286678I-500J0* |
G01X232361Y319897D02* |
G03X220237Y286678I149J-18876D01* |
G01X232361Y319897D02* |
G03X232857Y320397I-4J500D01* |
G01Y348157* |
G03X232718Y348502I-500J0* |
G01X232430Y348828D02* |
G03X232718Y348503I4446J3647D01* |
G01X232430Y348828D02* |
G03X232043Y349011I-387J-317D01* |
G01X231160* |
G03X230818Y348875I0J-500* |
G01X228763Y348061D02* |
G03X230818Y348875I-0J3000D01* |
G01X228763Y348061D02* |
X223663D01* |
X220663Y351061D02* |
G03X223663Y348061I3000J-0D01* |
G01X220663Y351061D02* |
Y354961D01* |
X221116Y356547D02* |
G03X220663Y354961I2547J-1586D01* |
G01X221116Y356547D02* |
G03Y357075I-424J264D01* |
G01X220663Y358661D02* |
G03X221116Y357075I3000J-0D01* |
G01X220663Y358661D02* |
Y361292D01* |
G03X220163Y361792I-500J-0* |
G01X213196* |
G03X212708Y361181I-0J-500* |
G01X202703Y364183D02* |
G03X212708Y361181I4154J-4329D01* |
G01X202703Y364183D02* |
G03X202857Y364544I-346J361D01* |
G01Y366332* |
X202886Y366820D02* |
G03X202857Y366332I3971J-488D01* |
G01X202886Y366820D02* |
G03X202390Y367381I-496J61D01* |
G01X201170* |
G03X200817Y367234I0J-500* |
G01X198496Y364913* |
G03X198349Y364560I353J-353* |
G01Y176639* |
G03X198496Y176286I500J0* |
G01X263686Y111184* |
G03X264039Y111037I353J353* |
G01X299882* |
X398646Y320519D02* |
G03X398255Y321331I-391J312D01* |
G01X388422* |
G03X388031Y320519I-0J-500* |
G01X389279Y315938D02* |
G03X388031Y320519I-5940J842D01* |
G01X389279Y315938D02* |
G03X389381Y315559I495J-70D01* |
G01X391499Y312861* |
G03X391892Y312670I393J309* |
G01X397933* |
G03X398349Y313447I0J500* |
G01X398646Y320519D02* |
G03X398349Y313447I4693J-3739D01* |
G01X377867Y116039D02* |
G03X378185Y116925I0J500D01* |
G01X377094Y119240D02* |
G03X378185Y116925I3000J-0D01* |
G01X377094Y119240D02* |
Y125240D01* |
X377195Y126011D02* |
G03X377094Y125240I2899J-771D01* |
G01X377195Y126011D02* |
G03X376712Y126640I-483J129D01* |
G01X370994* |
X367494Y130140D02* |
G03X370994Y126640I3500J-0D01* |
G01X367494Y130140D02* |
Y130740D01* |
Y148940* |
X367914Y150602D02* |
G03X367494Y148940I3080J-1662D01* |
G01X367914Y150602D02* |
G03Y151077I-440J238D01* |
G01X367494Y152740D02* |
G03X367914Y151077I3500J-0D01* |
G01X367494Y152740D02* |
Y154340D01* |
X370994Y157840D02* |
G03X367494Y154340I-0J-3500D01* |
G01X370994Y157840D02* |
X376712D01* |
G03X377195Y158468I-0J500* |
G01X377094Y159240D02* |
G03X377195Y158468I3000J-0D01* |
G01X377094Y159240D02* |
Y165240D01* |
X377614Y166928D02* |
G03X377094Y165240I2480J-1688D01* |
G01X377614Y166928D02* |
G03X377201Y167709I-413J281D01* |
G01X310247* |
G03X309834Y166928I0J-500* |
G01X310354Y165240D02* |
G03X309834Y166928I-3000J-0D01* |
G01X310354Y165240D02* |
Y159240D01* |
X310253Y158468D02* |
G03X310354Y159240I-2899J772D01* |
G01X310253Y158468D02* |
G03X310736Y157840I483J-128D01* |
G01X316494* |
X319994Y154340D02* |
G03X316494Y157840I-3500J-0D01* |
G01X319994Y154340D02* |
Y152740D01* |
X319574Y151077D02* |
G03X319994Y152740I-3080J1663D01* |
G01X319574Y151077D02* |
G03Y150602I440J-237D01* |
G01X319994Y148940D02* |
G03X319574Y150602I-3500J-0D01* |
G01X319994Y148940D02* |
Y131740D01* |
Y130740* |
Y130140* |
X316494Y126640D02* |
G03X319994Y130140I-0J3500D01* |
G01X316494Y126640D02* |
X310736D01* |
G03X310253Y126011I0J-500* |
G01X310354Y125240D02* |
G03X310253Y126011I-3000J-0D01* |
G01X310354Y125240D02* |
Y119240D01* |
X309262Y116925D02* |
G03X310354Y119240I-1908J2315D01* |
G01X309262Y116925D02* |
G03X309581Y116039I319J-386D01* |
G01X377867* |
X456354Y166928D02* |
G03X455941Y167709I-413J281D01* |
G01X388987* |
G03X388574Y166928I0J-500* |
G01X389094Y165240D02* |
G03X388574Y166928I-3000J-0D01* |
G01X389094Y165240D02* |
Y159240D01* |
X388993Y158468D02* |
G03X389094Y159240I-2899J772D01* |
G01X388993Y158468D02* |
G03X389476Y157840I483J-128D01* |
G01X395194* |
X398694Y154340D02* |
G03X395194Y157840I-3500J-0D01* |
G01X398694Y154340D02* |
Y152740D01* |
X398274Y151077D02* |
G03X398694Y152740I-3080J1663D01* |
G01X398274Y151077D02* |
G03Y150602I440J-237D01* |
G01X398694Y148940D02* |
G03X398274Y150602I-3500J-0D01* |
G01X398694Y148940D02* |
Y131740D01* |
Y130740* |
Y130140* |
X395194Y126640D02* |
G03X398694Y130140I-0J3500D01* |
G01X395194Y126640D02* |
X389476D01* |
G03X388993Y126011I0J-500* |
G01X389094Y125240D02* |
G03X388993Y126011I-3000J-0D01* |
G01X389094Y125240D02* |
Y120666D01* |
G03X389594Y120166I500J-0* |
G01X455334* |
G03X455834Y120666I-0J500* |
G01Y125240* |
X455935Y126011D02* |
G03X455834Y125240I2899J-771D01* |
G01X455935Y126011D02* |
G03X455452Y126640I-483J129D01* |
G01X449694* |
X446194Y130140D02* |
G03X449694Y126640I3500J-0D01* |
G01X446194Y130140D02* |
Y130740D01* |
Y148940* |
X446614Y150602D02* |
G03X446194Y148940I3080J-1662D01* |
G01X446614Y150602D02* |
G03Y151077I-440J238D01* |
G01X446194Y152740D02* |
G03X446614Y151077I3500J-0D01* |
G01X446194Y152740D02* |
Y154340D01* |
X449694Y157840D02* |
G03X446194Y154340I-0J-3500D01* |
G01X449694Y157840D02* |
X455452D01* |
G03X455935Y158468I-0J500* |
G01X455834Y159240D02* |
G03X455935Y158468I3000J-0D01* |
G01X455834Y159240D02* |
Y165240D01* |
X456354Y166928D02* |
G03X455834Y165240I2480J-1688D01* |
G01X539291Y158935D02* |
Y164859D01* |
G03X538477Y165248I-500J-0* |
G01X513640Y167534D02* |
G03X538477Y165248I13596J11644D01* |
G01X513640Y167534D02* |
G03X513260Y167709I-380J-325D01* |
G01X467727* |
G03X467314Y166928I0J-500* |
G01X467834Y165240D02* |
G03X467314Y166928I-3000J-0D01* |
G01X467834Y165240D02* |
Y159240D01* |
X467733Y158468D02* |
G03X467834Y159240I-2899J772D01* |
G01X467733Y158468D02* |
G03X468216Y157840I483J-128D01* |
G01X473894* |
X477394Y154340D02* |
G03X473894Y157840I-3500J-0D01* |
G01X477394Y154340D02* |
Y152740D01* |
X476974Y151077D02* |
G03X477394Y152740I-3080J1663D01* |
G01X476974Y151077D02* |
G03Y150602I440J-237D01* |
G01X477394Y148940D02* |
G03X476974Y150602I-3500J-0D01* |
G01X477394Y148940D02* |
Y131740D01* |
Y130740* |
Y130140* |
X475728Y127159D02* |
G03X477394Y130140I-1834J2981D01* |
G01X475728Y127159D02* |
G03X475990Y126233I262J-426D01* |
G01X506494Y126219* |
G03X506847Y126365I0J500* |
G01X539144Y158581* |
G03X539291Y158935I-353J354* |
G01X578491Y256573D02* |
G03Y257102I-425J264D01* |
G01X578037Y258687D02* |
G03X578491Y257102I3000J0D01* |
G01X578037Y258687D02* |
Y262587D01* |
X578070Y263030D02* |
G03X578037Y262587I2967J-443D01* |
G01X578070Y263030D02* |
G03X577576Y263604I-494J74D01* |
G01X575950* |
X574523Y263965D02* |
G03X575950Y263604I1427J2639D01* |
G01X574523Y263965D02* |
G03X573932Y263878I-238J-440D01* |
G01X566565Y256512* |
G03X566919Y255658I354J-354* |
G01X577739* |
G03X578210Y255991I0J500* |
G01X578491Y256573D02* |
G03X578210Y255991I2546J-1586D01* |
G01X624383Y189275D02* |
Y226533D01* |
G03X624234Y226889I-500J0* |
G01X609386Y241556* |
G03X608534Y241200I-352J-356* |
G01Y239042* |
G03X608681Y238688I500J-0* |
G01X610129Y237240* |
X611301Y234411D02* |
G03X610129Y237240I-4000J0D01* |
G01X611301Y234411D02* |
Y194747D01* |
G03X611468Y194374I500J0* |
G01X605142Y183851D02* |
G03X611468Y194374I2159J5865D01* |
G01X605142Y183851D02* |
G03X604549Y183110I-173J-469D01* |
G01X604838Y176817D02* |
G03X604549Y183110I-5537J2899D01* |
G01X604838Y176817D02* |
G03X605281Y176085I443J-232D01* |
G01X611192* |
G03X611546Y176231I0J500* |
G01X624236Y188922* |
G03X624383Y189275I-353J353* |
G01X372561Y366934D02* |
X375253Y364242D01* |
X380703Y366934D02* |
X378011Y364242D01* |
X372561Y357092D02* |
X375253Y359784D01* |
X578916Y256566D02* |
X581608Y259258D01* |
X466955Y167361D02* |
X463955Y164361D01* |
X456713Y167361D02* |
X459713Y164361D01* |
X388215Y167361D02* |
X385215Y164361D01* |
X377973Y167361D02* |
X380973Y164361D01* |
X309475Y167361D02* |
X306475Y164361D01* |
X299233Y167361D02* |
X302233Y164361D01* |
X596468Y264709D02* |
X593776Y262016D01* |
X572511Y180142D02* |
X575437Y183068D01* |
X572511Y189884D02* |
X575437Y186958D01* |
X470745Y361405D02* |
X473452Y358697D01* |
X492018Y365205D02* |
X489091Y362278D01* |
X492018Y355462D02* |
X489091Y358389D01* |
X477775Y365205D02* |
X480702Y362278D01* |
X595067Y197949D02* |
X592374Y195257D01* |
X585224Y197949D02* |
X587916Y195257D01* |
X417638Y367982D02* |
X420330Y365289D01* |
X425781Y367982D02* |
X423088Y365289D01* |
X375492Y349165D02* |
X378184Y351858D01* |
X241996Y287989D02* |
X522000D01* |
Y188001* |
X241996* |
Y287989* |
G54D31* |
X264000Y302500D03* |
X274000D03* |
X284000D03* |
X294000D03* |
X304000D03* |
X527300Y179300D03* |
Y179000D03* |
Y179300D03* |
X527600Y179000D03* |
X354000Y302500D03* |
X364000D03* |
X374000D03* |
X384000D03* |
X527800Y301200D03* |
X527800D03* |
G54D35* |
X599301Y179716D03* |
Y189716D03* |
X607301D03* |
Y179716D03* |
G54D40* |
X256857Y359854D03* |
X585703Y281862D03* |
X304354Y122240D03* |
Y162240D03* |
X383094Y122240D03* |
Y162240D03* |
X461834Y122240D03* |
Y162240D03* |
X291693Y359854D03* |
X303339Y346780D03* |
G54D42* |
X397749Y355260D03* |
Y362060D03* |
X409043D03* |
Y355260D03* |
G54D43* |
X581882Y172013D02* |
X577382D01* |
X581882Y185013D02* |
X577382D01* |
X482647Y360333D02* |
X487147D01* |
X482647Y347333D02* |
X487147D01* |
X459362D02* |
X454862D01* |
X459362Y360333D02* |
X454862D01* |
G54D44* |
X474867Y349283D03* |
Y357283D03* |
X466867Y353283D03* |
G54D45* |
X632664Y271563D02* |
Y271063D01* |
Y281429D02* |
Y281929D01* |
Y292295D02* |
Y291795D01* |
X457160Y316241D02* |
Y316741D01* |
X446363Y316241D02* |
Y316741D01* |
G54D46* |
X618301Y208716D03* |
Y160716D03* |
G54D47* |
X527500Y301000D03* |
Y179000D03* |
X232500D03* |
Y301000D03* |
G54D48* |
X563521Y214307D02* |
Y219507D01* |
X566071Y214307D02* |
Y219507D01* |
X568621Y214307D02* |
Y219507D01* |
X571171Y214307D02* |
Y219507D01* |
X573721Y214307D02* |
Y219507D01* |
X576271Y214307D02* |
Y219507D01* |
X578821Y214307D02* |
Y219507D01* |
X581371Y214307D02* |
Y219507D01* |
X583921Y214307D02* |
Y219507D01* |
X586471Y214307D02* |
Y219507D01* |
X589021Y214307D02* |
Y219507D01* |
X591571Y214307D02* |
Y219507D01* |
X594121Y214307D02* |
Y219507D01* |
X596671Y214307D02* |
Y219507D01* |
Y242307D02* |
Y247507D01* |
X594121Y242307D02* |
Y247507D01* |
X591571Y242307D02* |
Y247507D01* |
X589021Y242307D02* |
Y247507D01* |
X586471Y242307D02* |
Y247507D01* |
X583921Y242307D02* |
Y247507D01* |
X581371Y242307D02* |
Y247507D01* |
X578821Y242307D02* |
Y247507D01* |
X576271Y242307D02* |
Y247507D01* |
X573721Y242307D02* |
Y247507D01* |
X571171Y242307D02* |
Y247507D01* |
X568621Y242307D02* |
Y247507D01* |
X566071Y242307D02* |
Y247507D01* |
X563521Y242307D02* |
Y247507D01* |
G54D49* |
X360249Y358660D03* |
X446543D03* |
G74* |
X0Y0D02* |
M02* |
/Designs/Data_loggers/GMCOUNT/CAM_GMC01A/V1.pdf |
---|
0,0 → 1,616 |
+%âãÏÓ |
+0000000016 00000 n |
+0000000904 00000 n |
+0000001201 00000 n |
+0000001405 00000 n |
+0000001539 00000 n |
+0000001746 00000 n |
+0000002174 00000 n |
+0000002213 00000 n |
+0000002235 00000 n |
+0000006544 00000 n |
+0000006566 00000 n |
+0000010175 00000 n |
+0000010197 00000 n |
+0000014092 00000 n |
+0000014114 00000 n |
+0000017983 00000 n |
+0000018005 00000 n |
+0000022119 00000 n |
+0000022141 00000 n |
+0000025899 00000 n |
+0000025921 00000 n |
+0000029438 00000 n |
+0000029460 00000 n |
+0000032901 00000 n |
+0000050439 00000 n |
+0000053116 00000 n |
+0000000993 00000 n |
+0000001181 00000 n |
+stream |
+stream |
+»I÷u,¹sÆc:7È7{qÉÇÜåøéÐG ? ¿¦sÆæe3GµR\hÎe5ÜEîG6Ì~e¶5Þ|ÁQ`:rfÞ¥Õ6OõX5¦í³2M[çz7uæOà4ÓÕ¶Äåu\=AòJ0Ò®:ÍÕmWïûâÀý¶Í+£rÍîÚ·Ãkq¿Ó¶ZR7Ók;¨Þ¯V»íWWî²¹FyÔËsíòª*[}sºrê[PÔÚÎiÖ=¤ú"×ò®±XWJuò¬[JÕä¶;·ê®qy嵧lSó ¯¨+ë¼óKú¶u³¿LËíV'í+ÓrlO,lXêÀLq?x0 º~f§n^Ó±ìû¾dAµ±D+,ÛÄ+hÀìÍÎ<÷¶M¯Fs\G"¶=y[,ÇÜwÊ]«¾ùEéØmêÊ×rvnìîã¦[±]+ÉfUï»,·ÒÜoaWSåáé é4KӣݳÅßÉ£aµª´ B 3¤;jï Ǻ=ºâf*WC+/Û2ó°5ÊÅ7 |
+[w,}_N( ¶ÙÖë |
+ÝÓ®¦îYv4¥.nºaÐ2õH£6³ZéaV\ ËÝzd_DÙes4[ûI·[Ë°_e<@åжä*à w¾q¸bMxn§a»5ò¦^v:RÙ|SlÒýªÐáp=GRô8F¹3nÌ!eFy#ô ¶wk²ÌαqÙÝù$bl`K|;ÏG¶¼X®ò8E¹NÌKD]nÖÅæPÔ3sn»Íq@æ©"ü³/Ëm{e/íöOb#PaÓ¥Û²q ÌĶÀlm\êÖ8&ܸßäÛAK©¼Æ=;¹Ü½$ÁZþ@ R9ó«äÅÓ¢6)·«+f ñtc³r,ÎÃÓ6ÏèiÌÃ<0wsùàaaÇò2¹rظó2³;WO 2hKþæÌÌdÁ3¦ù |
+ÛÅyÚ¨øqu6mÌq©>ȱ$GfnXC»0mßÕ¿ÇxdTÙërÞÞdÊÌ1ë¬äÆÝ\椢l/Q0Ê'sðÃd%Á+ÌÁB:94ÊäÔP&s |
+»sbS°Ê)ÓBpu\y^íK&®\¹ÛÊÑÕ |
+U Ñ?¼G3*&ã'Åáb@(¿ZYY}ÆÍw»ìWþ×ÛÍcTpÎIߢõ |
+íaÍ`®½£Xx_ZÚÙ·å|"}#pùz/ÖrÉLï#NCøzJðËJ£9?¦)½1¤ûí7æäýR@¹×Ò+kÊÔá7ñoÝùm~s_ ³çÏv6´èÒÍM-ÐõGãÛhnµÄÈí_LÁnèÅÖ£ÇåPÁGߢº³· «éd®aí,É{~{ûa¯1BM>èg;Q8ïÊÖ |
+ÒQc¾)16ÿ]çдéÜ5ÿ`Ó]Ùe7õ´ä§ÜF6ºóí[<½¹i3-M¶G¤ |
+hÅÍ"Ú[ïæ*)®ÏÖíG*ö;Ù|Íù(Ìíf<9%þqø ìã |
+nì'/K;÷ ÑèÎ ³käuíìó1<ضµß>Pú0½kd OøæùöV(\%¾ut\ NÌgN<+Îqÿì¦àGcÛ±ÀòÀγbi.às«My9*wNæâÁ³xîõ¼¦:£vô4ñ[ ç¶çIoþÁ*gú§^`!k¾Ãßa%ld°h,Î=°Á ³áruHɹâÃLv)XüX_l¹¼)ÂÍøLVM&ÑÉQ¬½è-O{"c |
+ró8ã@&ÌXMY9éàÑ9ÚyÕÃxWÏöl.ksbµ;Üë=Ãäþ+E7»ú/¸Û28£ß¢Y6f1+f©`øR-F³Tk^ßRÍKÒ-Û$ªl>¢Rs¥RkÚoÈ*Íg®u«4¬UPégvÔlÜ**6ëµ¼@ÖkyÁ¬×òþ§^ãó²@ãÛ½¥\³río9xË5~É)×g-×G-×W©Öx֩μQù²2߸Çv9Þ¥·ð»ç6ï(%ß·ð¸ûÔ;NS,TÇPÅÌEvSÇÆÛÞ?ñý£Éö(~pf³ÄÏ°÷ççé֨㩣X2# ÆÑGqµ£ß¸zÊ;vÔï¾L»ß »¥gåpùpú%åºíòc¯W/ÅáõÎÓÀÛ®Þn¥+Þ¢°;Û¥öntAÀ 6'äùküBÜ!7ÇVåɸþáYåi¼ª<ÅÓ§lv!OCò$_yúq«Èó´#rõh÷(ò´X½µÈÓø"®:E(¸gbêÓwÕ'£÷\LW¯9ÞnÖU¿¹ |
+ywÃAn(ØPPÈùêÎéÕÂýEðR}B8¢Ú/.>Dõ{@>¦©ÛÕw£)Zg½Í<{qx3ö_;!¿jýÅ3nHÓi°àÆã2$:WÆiL[¿os%Äßâq÷#ïøãý8±ÀþTnñ«¡12#óFäóÔàèR!ÑÄT°MGå |
+QD;1íÌOwÉýÒÝÝÊmædê<ÏǼYü¹x\úöS;J®^ÂøÊà |
+stream |
+Úè²ì÷TEì÷Ä4»Þâû¨Nî~cÑ}ÀÅ£ßD÷åªQ½è"ÌèRïúÇõèMôózôDý:Z÷iÜ£Ö¶,}Ô=2k*'wXäuSz=uòéèkúuF÷9RtI¸ýîÓÓº\ü¬)àëô¨XV ù%NÝÆ£1ò PùìíËAÈ |
+¸¤Þ¢à^åå@DlÄi¤Y¸*¢`ÌÈ÷4'~.â©¿¤©oßM}$CG£F@Ó§ã%T\Ò#Þ%) |
+N |
+EnS^Ñ÷'gÒÌaÖÆ1ôä3HË~}8îbó9ôa̺ÃlÜWEÔ!1ÅtL#8È4RAÆtº=º-D«Î 3(ØX1Ó³.åpUDYÈI:'GN3xä©'ösêröÕßÌ$¢bcÅL#̺.ç{BÈbìí*t9]¯R%ö{ä¤x»]xÌr9Àâqb]Êáª!$²0 »]NÓÇå )(·8I2¯q=G嫧ÅëRWEÔ!1 ç¶ö\V h¤êý¯ã¶g©ÔrUÓâu)«Bά 595ßVPóe bÿës[A³TÊV@D9ÄƪÄiñº.'Ž!ô!·Òn+(í²@ª±ÿ¥ÜVPâ,¢¹ ÄiñºÃUmÁ |
+"Yçmy^V h¤òýÏý¶|ÝJ¹F+ ¢bc¯%÷Û |
+¸*¢3XA$9é¶ÁQN |
+VØÿ´n+H×F´"Ê!6VéºYÒº«BN |
+VÉTo+ä TýOé¶tÝJÏV@D9ÄsÝ,)ÝVÀUÁ |
+"YóôÛ |
+9 Õbÿz[ÁsÝJOV@ärr´çºYz[WE´+dUN^ë²ÅG¡ÊkyË |
+ò³WVà;VV©½.äøª®cÙKÎÞÑärR¶l+¼OC>r9afiÙ#gvä¤ýÇ#ÇÐèBb {6ÊÁþQa¶½µm7Â<Ã#è'faaÇÊÊ3°× _Q#Ä@ö²cÓår 1².M96ìär30ëRWEÔ!1½Úå÷¹@#ˤģfÔ¬ ¢b°±ÿ¬K9\Õ¢ dìu9z39!'N¯;ËQ»( D9Ä`Õbÿs¤s2jÈ^cïh¤J>F\*¦`(ØX1ÓrY¯h;Vp½ .Ç^u.ÐHÕ8-|*9+î3o+ «û_Û |
+j%²ÄHöúàrìÍír !'Nò.Ï|F[´"Ê!«û_Çm5Î Yb${ý|;rÆeFªÅiáÏ,ahDCV%ö¿µÛ |
+Z%Bâønòû4ʱ߫.ÐHõëféù¶âÞõ'Zå+fáo+è×BH¬ß`¤Û |
+9Fj\7K_·ô÷®hD.gD+`&¯Û |
+Æu+%F²3o+åÌ`ãºYF¿`´¸w£F+ ¢b°j±ÿ£ßV0®[ 8¿[Áì·r Ô¼nYn+9îÝLÑ |
+D"oË«æ³±]F¬Të«v_ÇÐÎ=¸eÉ5RÉ·Ú¥F;abËÜÞ^ÅóèÕÁ\Ýî4\.£&y VÔÕú"ëkvª-sÊæpC_P(ìòd¢#,³Õ¥9ñskKHbë¤iïÛ®´ì|3Ó²?bTDz" |