新聞中心

        EEPW首頁 > 嵌入式系統 > 設計應用 > s3c2440頭文件之2440slib.h

        s3c2440頭文件之2440slib.h

        作者: 時間:2016-11-11 來源:網絡 收藏
        //===================================================================

        // File Name : 2440lib.h
        // Function : S3C2440
        // Date : February 26, 2002
        // Version : 0.0
        // History
        // 0.0 :Feb.20.2002:SOP : Programming start
        // 0.01:Mar.29.2002:purnnamu: For Sleep_wake_up, the START... label is added
        //===================================================================

        本文引用地址:http://www.104case.com/article/201611/316747.htm

        #ifndef __2440lib_h__
        #define __2440lib_h__

        #ifdef __cplusplus
        extern "C" {
        #endif

        #include "option.h"

        #if USE_MAIN
        #include
        #define Uart_Printf printf
        #endif

        #define min(x1,x2) (((x1)<(x2))? (x1):(x2))
        #define max(x1,x2) (((x1)>(x2))? (x1):(x2))

        #define ONESEC0 (62500) //16us resolution, max 1.04 sec
        #define ONESEC1 (31250) //32us resolution, max 2.09 sec
        #define ONESEC2 (15625) //64us resolution, max 4.19 sec
        #define ONESEC3 (7812) //128us resolution, max 8.38 sec
        #define ONESEC4 (PCLK/128/(0xff+1))//@60Mhz, 128*4us resolution, max 32.53 sec

        #define NULL 0

        #define EnterPWDN(clkcon) ((void (*)(int))0x20)(clkcon)
        void StartPointAfterSleepWakeUp(void); //purnnamu:Mar.29.2002


        // 2440lib.c
        void Delay(int time); //Watchdog Timer is used.

        void *malloc(unsigned nbyte);
        void free(void *pt);

        void Port_Init(void);
        void Uart_Select(int ch);
        void Uart_TxEmpty(int ch);
        void Uart_Init(int mclk,int baud);
        char Uart_Getch(void);
        char Uart_GetKey(void);
        void Uart_SendByte(int data);

        #if !USE_MAIN
        void Uart_Printf(const char *fmt,...);
        #endif

        void Uart_SendString(char *pt);

        void Timer_Start(int divider); //Watchdog Timer is used.
        int Timer_Stop(void); //Watchdog Timer is used.


        void ChangeClockDivider(int hdivn_val,int pdivn_val);
        void ChangeUPllValue(int m,int p,int s);
        void ChangeMPllValue(int m,int p,int s);


        #ifdef __cplusplus
        }
        #endif

        #endif //__2440lib_h__



        關鍵詞: s3c2440頭文

        評論


        技術專區

        關閉
        主站蜘蛛池模板: 土默特右旗| 济南市| 周宁县| 丘北县| 沂南县| 荥阳市| 琼中| 五指山市| 迁安市| 土默特右旗| 杭锦旗| 建德市| 毕节市| 海南省| 桐柏县| 宜丰县| 龙泉市| 定州市| 新竹县| 平度市| 陵川县| 黎平县| 高唐县| 德惠市| 高陵县| 台山市| 盐城市| 碌曲县| 柳江县| 阿拉善左旗| 南皮县| 博白县| 左权县| 翁源县| 麻城市| 平果县| 革吉县| 博白县| 达日县| 固始县| 水富县|