基于IAR的CC2530关于Flash的读写程序 - 免费下载
技术资料资源
文件大小:549 K
💡 温馨提示:本资源由用户 ttalli 上传分享,仅供学习交流使用。如有侵权,请联系我们删除。
# include <iocc2530.h>
# include <string.h>
# define uintunsigned int
# define uchar unsigned char
# define uint8 unsigned char
# define uint16
unsigned int
# ifndef BV
# define Bv(n)
(1 << (n))
fendif
# define st (x)
do (x} while (LINE==-1)
/* SPI settings*/
# define HAL SPI CLOCK POL LO
0x00
fdefine HAL SPI CLOCK PHA O
0x00
# define HAL SPI TRANSFER MSB FIRST 0x20
fdefine FLASH CS PORT 1
//"OAFLASHDE-A9E2O
#define FLASH CS PIN
/* FLASH SPI lines */
#define FLASH CLK PORT 1
#define FLASH CLK PIN 5
3
#define FLASH MOSI PORT 1
#define FLASH MOSI PIN
#define FLASH MISO PORT 1
#define FLASH MISO PIN 7