📄 main.c
字号:
/*
* File: main.c
* Purpose: sample program
*
*/
#include <stdio.h>
#include "DataType.h"
#include "MC68VZ328.h"
#include "nandflash.h"
extern void usb_isr();
__declspec(interrupt) void Interrupt_Service_Program_Autovector3(void)
{
if(ISR & 0x00040000)
{
usb_isr();
}
}
static unsigned char buf2M[0x10000];
static unsigned char buf[0x10000];
int main()
{
//UWORD tmp, i;
int i;
*((UCHAR *) 0xFFFFF300) = 0x18;
*((ULONG *) 0x06c) = (ULONG)Interrupt_Service_Program_Autovector3;
usb_initialize();
IMR &= ~0x00040000;
InitNandFlash();
/* tmp = ReadID();
for (i=0; i<512; i++)
{
buf[i]= i;
}
WriteSector1(buf, 0, 1);
ReadSector1(buf2M, 0, 1);
*/
while (1)
{
Usb_Main();
}
return 0;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -