s3c2440 header file 2440slib.h

Publisher:CuriousTravelerLatest update time:2016-08-07 Source: eefocusKeywords:s3c2440 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
//===================================================================

// 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
//===================================================================

#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__

Keywords:s3c2440 Reference address:s3c2440 header file 2440slib.h

Previous article:ARM interrupt macro definition
Next article:s3c2440 header file 2440lib.h

Recommended ReadingLatest update time:2024-11-16 16:36

S3c2440 bare metal-spi programming-3.gpio simulation spi driver OLED
To operate OLED, connect to OLED through three lines (SCK, DO, CS). There is no DI here because 2440 will only transmit data to OLED without receiving data. gpio_spi.c implements gpio simulation spi and is responsible for spi communication. For OLED, there are special instructions and data formats. The data content to
[Microcontroller]
S3c2440 bare metal-spi programming-3.gpio simulation spi driver OLED
GNU ARM Assembly - (XI) Summary
        I studied part of s3c2440 and got a deeper understanding of assembly, arm system, and interrupts. The biggest feeling of debugging the low-level assembly process is to read the datasheet carefully, because it is an English document.         What I wrote before are the basic things of embedded underlying layer.
[Microcontroller]
Design of I2C Touch Screen Based on ARM Processor S3C2440 and Linux
0Introduction With the development of computer-related technologies, ARM embedded systems are being used more and more widely, and are becoming more and more closely integrated with people's lives. Touch screen devices are widely used in this embedded field because of their friendly human-computer interacti
[Microcontroller]
s3c2440 bare metal-nandflash programming (2. nand controller and nand access timing)
1.Steppingstone We know that nand does not have an independent address line, and the CPU cannot directly access the instructions on nand, so nand cannot be executed on-chip. So why does the program still support nand startup? To support NAND boot, the S3C2440A is equipped with an internal SRAM buffer called "Steppin
[Microcontroller]
s3c2440 bare metal-nandflash programming (2. nand controller and nand access timing)
u-boot-2011.06 transplanted based on s3c2440 development board DM9000
The default network chip of u-boot is CS8900, but the network chip on the development board is DM9000, so in order to use the network function, it must be transplanted. Fortunately, u-boot has the driver of DM9000, we only need to replace the part about CS8900 with the part about DM9000. First, comment out the
[Microcontroller]
Porting s3c2440 ads program to keil (Part 2) Preliminary completion
What if I change the parameter configuration? Then compile again to package errors As follows The error is as follows This error cannot be solved Finally, I checked the method of netizens on the Internet and it can be modified, but the nand file is introduced Finally, I know that the 2440init.s file needs to be m
[Microcontroller]
Porting s3c2440 ads program to keil (Part 2) Preliminary completion
S3C2440 bare metal ------Nor Flash programming _ erase and read
1. Read NorFlash We first implement the function of reading flash. By default, we read 64 bytes each time, and then print out the read content, with the value printed in the front and the characters printed in the back. Invisible characters are replaced by ... void do_read_nor_flash(void) { unsigned int addr; vo
[Microcontroller]
S3C2440 bare metal ------Nor Flash programming _ erase and read
S3C2440 timer 4 interrupt test program
__irq is an identifier used to indicate whether a function is an interrupt function. For different compilers, the position of __irq in the function name is different, for example: In the ADS compiler: void __irq IRQ_Eint0(void); In the Keil compiler: void IRQ_Eint0(void) __irq; But its meaning is the same, it complete
[Microcontroller]
Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号