/********************************************************************
*   UTI.h
*   Function & Marco Definitions
*
********************************************************************/
#ifndef _UTI_H_
#define _UTI_H_

#ifdef WIN32
#define _nop_() while(1) break;
#else
//#include <intrins.h>
#include "stdio.h"
#include "BL210x.h"
#endif


//#define LogDbg
//      printf("\nRW->Dbg:");
//      printf

extern unsigned int TimingDelay;

//for MCU clock cycle-4T, xtal-12MHz
/********************************************************************
** function declaration
********************************************************************/

void delay_init(void);
void delay_ms(uint16_t nms);
void delay_us(uint32_t nus);


extern void delay_mms(unsigned int nTime);
extern void Delay10us(unsigned char n);					   
extern void Delay100us(unsigned char n);
extern void Delay1ms(unsigned int  n);
extern void LogBuf(const char *comment ,unsigned char *buf, unsigned char buf_len);

extern void *rwmemset(void *s, int c, unsigned char count);
extern void *rwmemcpy(void *desc,const void * src,unsigned char size);
extern int rwmemcmp(const void *cs, const void *ct, unsigned char count);

#endif

