Browse code

Add source code of the firmware for the IO Board

Pawel Jablonski authored on 05/06/2023 17:01:27
Showing 1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,27 @@
1
+/*
2
+ * Author: Pawel Jablonski
3
+ * E-mail: pj@xirx.net
4
+ * WWW: xirx.net
5
+ * GIT: git.xirx.net
6
+ *
7
+ * License: You can use this code however you like
8
+ * but leave information about the original author.
9
+ * Code is free for non-commercial and commercial use.
10
+ */
11
+
12
+#ifndef _FLASH_H
13
+#define _FLASH_H
14
+
15
+#include "type.h"
16
+
17
+#define FLASH_SECTOR_SIZE 512 //!< Sector size
18
+#define FLASH_SECTOR_QUANTITY 4096 //!< Sector quantity
19
+
20
+#define FLASH_SIZE (FLASH_SECTOR_SIZE * FLASH_SECTOR_QUANTITY) //!< Total flash size
21
+
22
+void flashInit(void);
23
+
24
+bool flashRead(unsigned int sector, unsigned char *buffer);
25
+bool flashWrite(unsigned int sector, unsigned char *buffer);
26
+
27
+#endif