-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexamples.c
More file actions
33 lines (27 loc) · 737 Bytes
/
examples.c
File metadata and controls
33 lines (27 loc) · 737 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
/*
* File: examples.c
* Author: Jason White <Jason@JSWhite.net>
* License: Modified BSD License
*
* Version: 1.0
* Release Date: 08/06/2012
* Copyright 2012 (C) Jason White <Jason@JSWhite.net>
* White Waters Software
*
* http://www.github.com/python50/flashlib
*
*/
#include "flashlib.h"
void main()
{
//Write A-Z plus a few others into flash
char items[32]={0};
for(char i=0;i!=32;i++)
items='A'+i;
flashlib_row_erase(FLASHLIB_DATA_ROW_0); //erase before writing
flashlib_row_write(FLASHLIB_DATA_ROW_0,items,32); //write 32 letters into flash
//Read them back
char read_items[32]={0};
for(char i=0;i!=32;i++)
read_items[i]=flashlib_read_word(FLASHLIB_DATA_ROW_0+i);
}