#include <stdio.h>
#include "NUC1xx.h"
#include "LCD_Driver.h"
#include "DrvSYS.h"
#include "DrvGPIO.h"
/*---------Function Delay-----------------*/
void delay(void){
int j;
for(j=0;j<3000;j++);
}
int Delay(int ms){
	while(ms--);
	return 0;}
/*---------MAIN function------------------*/
/*----------------------------------------*/
int main(void){
	Initial_pannel();
	clr_all_pannal();
	DrvGPIO_ClrBit(E_GPD,14); 							// mengaktifkan latar LCD 
	print_lcd(0, "Weather Station "); 
	print_lcd(1, "                "); 
	print_lcd(2, " Adrie Sentosa  "); 
	print_lcd(3, "NRP: 2212100078 "); 
	Delay(5000000);
	DrvGPIO_Open (E_GPB, 11, E_IO_OUTPUT);	//mengaktifkan Buzzer
	DrvGPIO_Open (E_GPA, 13, E_IO_OUTPUT);	//mengaktifkan RGB LED Hijau
	DrvGPIO_Open (E_GPC, 12, E_IO_OUTPUT);	//mengaktifkan LED1
	DrvGPIO_Open (E_GPC, 13, E_IO_OUTPUT);	//mengaktifkan LED2
	DrvGPIO_Open (E_GPC, 14, E_IO_OUTPUT);	//mengaktifkan LED3
	DrvGPIO_Open (E_GPC, 15, E_IO_OUTPUT);	//mengaktifkan LED4
	DrvGPIO_ClrBit(E_GPA,13);
	DrvGPIO_ClrBit(E_GPC,12);
	DrvGPIO_ClrBit(E_GPC,13);
	DrvGPIO_ClrBit(E_GPC,14);
	DrvGPIO_ClrBit(E_GPC,15);
	}