CLEON
Version 1
Cloud-Offloaded GPS Receiver
Main Page
Related Pages
Data Structures
Files
File List
Globals
sys_flash.c
Go to the documentation of this file.
1
7
#include "
cleon_conf.h
"
8
#include "
app_define.h
"
9
#include "
sys_define.h
"
10
#include "
hal_define.h
"
11
#include "
fs_define.h
"
12
13
/*----------------------------------------------------------------------------*/
21
void
SYS_EXT_FLASH_Init
(
void
)
22
{
23
SYS_EXT_FLASH_InitIO
();
24
}
25
26
/*----------------------------------------------------------------------------*/
34
void
SYS_EXT_FLASH_InitIO
(
void
)
35
{
36
// Release CS initially
37
EXT_FLASH_CS_PORT
(OUT) |=
BV
(
EXT_FLASH_CS_PIN
);
38
EXT_FLASH_CS_PORT
(
DIR
) |=
BV
(
EXT_FLASH_CS_PIN
);
39
40
EXT_FLASH_WP_PORT
(OUT) |=
BV
(
EXT_FLASH_WP_PIN
);
41
EXT_FLASH_WP_PORT
(
DIR
) |=
BV
(
EXT_FLASH_WP_PIN
);
42
43
EXT_FLASH_HOLD_PORT
(OUT) |=
BV
(
EXT_FLASH_HOLD_PIN
);
44
EXT_FLASH_HOLD_PORT
(
DIR
) |=
BV
(
EXT_FLASH_HOLD_PIN
);
45
46
// Set as SPI pins
47
EXT_FLASH_MOSI_PORT
(
SEL
) |=
BV
(
EXT_FLASH_MOSI_PIN
);
48
EXT_FLASH_MISO_PORT
(
SEL
) |=
BV
(
EXT_FLASH_MISO_PIN
);
49
EXT_FLASH_CLK_PORT
(
SEL
) |=
BV
(
EXT_FLASH_CLK_PIN
);
50
}
sys
sys_flash.c
Generated on Tue May 28 2013 15:17:19 for CLEON by
1.8.2