#include "mcu_init.h"
#include "config.h"
#include "device.h"
#include "w5500/spi2.h"

#include "weibo.h"

#include <stdio.h>

uint8 reboot_flag = 0;

void main()
{
  RCC_Configuration(); // Configure the system clocks
  GPIO_Configuration(); //GPIO configuration
  NVIC_Configuration(); //NVIC Configuration
  
  USART1_Init(); //115200@8-n-1
  printf("MCU initialized.\r\n");
  Reset_W5500();
  printf("Ethernet initialized over.\r\n");
  WIZ_SPI_Init();
  
  set_network();
  printf("W5500 is ready!\r\n");
  post_weibo_update("ÖØÆôW5500ÆÀ¹À°å 0¡£0~ Î¢²©·¢ËÍ...");
  while(1);

}
