Writing of LED driver based on WINCE S3C2440

Publisher:码字探险Latest update time:2016-02-25 Source: eefocusKeywords:WINCE  S3C2440  LED driver Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
These two statements are often seen in the BSP package of SMDK2440:

volatile IOPreg   *s2440IOP = (IOPreg *)IOP_BASE;
volatile INTreg   *s2440INT = (INTreg *)INT_BASE;

The simple understanding of these two statements is to make s2440IOP and IOP_BASE equivalent, and s2440INT and INT_BASE equivalent.

IOP_BASE and INT_BASE in the s244.h header file

#define IOP_BASE      0xB1600000 // 0x56000000
typedef struct  {
  unsigned int  rGPACON;   // 00
  unsigned int  rGPADAT;
  unsigned int  rPAD1[2];
   
  unsigned int  rGPBCON;   // 10
  unsigned int  rGPBDAT;
  unsigned int  rGPBUP;
  unsigned int  rPAD2;
   
  unsigned int  rGPCCON;   // 20
  unsigned int  rGPCDAT;
  unsigned int  rGPCUP;
  unsigned int  rPAD3;
   
  unsigned int  rGPDCON;   // 30
  unsigned int  rGPDDAT;
     unsigned int  rGPDUP;
     unsigned int  rPAD4;
   
  unsigned int  rGPECON;   // 40
  unsigned int  rGPEDAT;
  unsigned int  rGPEUP;
  unsigned int  rPAD5;
   
  unsigned int  rGPFCON;   // 50
  unsigned int  rGPFDAT;
  unsigned int  rGPFUP;
  unsigned int  rPAD6;
   
  unsigned int  rGPGCON;   // 60
  unsigned int  rGPGDAT;
  unsigned int  rGPGUP;
  unsigned int  rPAD7;
   
  unsigned int  rGPHCON;   // 70
  unsigned int  rGPHDAT;
  unsigned int  rGPHUP;
  unsigned int  rPAD8;
   
  unsigned int  rMISCCR;   // 80
  unsigned int  rDCKCON;  
  unsigned int  rEXTINT0;
  unsigned int  rEXTINT1;  
  unsigned int  rEXTINT2;   // 90
  unsigned int  rEINTFLT0;
  unsigned int  rEINTFLT1;
  unsigned int  rEINTFLT2;
  unsigned int  rEINTFLT3;  // A0
  unsigned int  rEINTMASK;
  unsigned int  rEINTPEND;
  unsigned int  rGSTATUS0;  // AC
  unsigned int  rGSTATUS1;  // B0
  unsigned int  rGSTATUS2;  // B4 ;;; SHL
  unsigned int  rGSTATUS3;  // B8
  unsigned int  rGSTATUS4;  // BC
 
  unsigned int  rFLTOUT;   // C0
  unsigned int  rDSC0;
  unsigned int  rDSC1;
  unsigned int  rMSLCON;

  unsigned int  rGPJCON;   // D0
  unsigned int  rGPJDAT;
  unsigned int  rGPJUP;
  unsigned int  rPAD9;
 
}IOPreg; 

#define INT_BASE      0xB0A00000 // 0x4A000000
typedef struct  {
    unsigned int  rSRCPND;
    unsigned int  rINTMOD;
    unsigned int  rINTMSK;
    unsigned int  rPRIORITY;
    unsigned int  rINTPND;
    unsigned int  rINTOFFSET;
    unsigned int  rSUBSRCPND;
    unsigned int  rINTSUBMSK;
}INTreg ;   

It can be seen that IOPreg and INTreg are two structures, and INT_BASE and IOP_BASE are two virtual addresses. Therefore, the above two statements strengthen the two virtual addresses into the first address of the structure, so that the registers corresponding to the structure can be accessed.


Keywords:WINCE  S3C2440  LED driver Reference address:Writing of LED driver based on WINCE S3C2440

Previous article:Several delay functions of STM32 under the system clock of 72M
Next article:Jiujiu's STM32 Notes (I) TIM module timer overflow &am

Recommended ReadingLatest update time:2024-11-17 01:38

Design of Embedded Image Acquisition System Based on WinCE
With the progress of science and technology and the development of society in my country, the acquisition, storage, processing and transmission technology of digital video images has been widely used and developed in recent years, and various image acquisition and processing systems have gradually penetrated into all a
[Microcontroller]
Design of Embedded Image Acquisition System Based on WinCE
The following points should be considered when designing or selecting LED driver power supply
According to the power usage rules of the power grid and the characteristics of the LED driver power supply, the following points should be considered when selecting and designing the LED driver power supply: 1. High reliability, especially the driving power supply of LED street lamps, which is installed at high altit
[Power Management]
Selection of white LED driving scheme
All ICs designed to drive white LEDs provide a constant current supply, and the vast majority are either inductor-based or charge-pump-based solutions. 9 Each of these solutions has its own advantages and disadvantages. The charge pump solution is also called the switched capacitor solution. It uses a split cap
[Power Management]
Selection of white LED driving scheme
Reliability and electromagnetic compatibility test scheme for LED drivers (I)
1. Introduction   With the continuous development of human science and technology, the night of our planet is becoming brighter and more gorgeous. Behind these changes is the continuous development of lighting technology. The electronic systems and components used in the development and manufacture of lighting techn
[Analog Electronics]
s3c2440 bare metal - resistive touch screen - 3 - touch screen TSC initialization and interrupt service program framework
1. ADC interrupt generation process Interrupt sources: Here ADC and TSC share the same interrupt source. SRCPND indicates which interrupt source generated the interrupt request. INTMODE: configure interrupt mode
[Microcontroller]
S3C2440-Bare Metal Edition-09 | Using S3C2440 to operate Nor Flash
1. Nor Flash and Nand Flash    Nor Nand interface Many pins, similar to RAM Fewer pins capacity Small (1-32MB) Large (128-512MB) Read Operation Simple, same as RAM Simple, same as RAM Write Operation Issue a specific command to write Issue a specific command to write price expensive Cheap Compare No bad block
[Microcontroller]
S3C2440-Bare Metal Edition-09 | Using S3C2440 to operate Nor Flash
2416 Development Record 7: Platform Driver LED (misc)
A brief introduction to platform drivers The previous few articles introduced the simplest way to write LED drivers. In Linux 2.6, a platform driver was proposed. The specific reasons for doing this will be explained in the following blog.  The platform driver here is just a framework and does not reflect the mean
[Microcontroller]
Introduction to the driving method of LED display
There are two driving modes for LED display screens: static scanning and dynamic scanning. Static scanning is further divided into static real pixels and static virtual, while dynamic scanning is also divided into dynamic real images and dynamic virtual. In a certain display area, the ratio of the num
[Power Management]
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号