#include "delay.h"
#include "sys.h"
#include "oled.h"
#include <string.h>
#include <stdlib.h>
#include <stdio.h>

int main(void)
{
    uint16_t time1ms = 0;
    uint16_t test = 0;

    delay_init();	    	 //��ʱ������ʼ��
    NVIC_Configuration(); 	 //����NVIC�жϷ���2:2λ��ռ���ȼ���2λ��Ӧ���ȼ�
    OLED_Init();
    OLED_Clear(OLED_BLACK);

    OLED_SetColor(OLED_WHITE, OLED_BLACK);
    OLED_SetText(6, 5, "����ӷ�", 0, FONT_12X12);
    
    OLED_SetColor(OLED_BLACK, OLED_WHITE);
    
    OLED_DrawCircle(30, 40, 20, 4);
    
    while (1)
    {
        if (time1ms % 200 == 0)
        {
            OLED_SetIntegerNum(22, 34, test, 3, 1, FONT_12X12);
        }
        
        if (time1ms % 100 == 0)
        {
            OLED_ShowTask();
        }
        
        if (time1ms % 1000 == 0)
        {
            time1ms = 0;
            OLED_Printf("test = %d\n", test++);
        }
        
        delay_ms(1);
        time1ms++;
    }
}