Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
12/31/02 11:37
Read: times


 
#35274 - Keil C - How to place Structure on Port
Hi All

Is it possible to place a structure on a port as it is in Hi-tech Picc C..ie..
//define structure

struct lcd_pin_map { // data bus is high nibble
unsigned rw :1; // read/write pin 0
unsigned rs :1; // register select pin 1
unsigned en :1; // enable pin 2
unsigned nc :1; // backlight drive pin 7
unsigned data :4; // LCD data pins 4..7
};

//then place on port..
#define LCDPORT PORTD
static volatile struct lcd_pin_map lcd @ (unsigned)&LCDPORT;

List of 18 messages in thread
TopicAuthorDate
Keil C - How to place Structure on Port            01/01/70 00:00      
RE: Keil C - How to place Structure on Port            01/01/70 00:00      
RE: Keil C - How to place Structure on Port            01/01/70 00:00      
RE: Keil C - How to place ... Erik            01/01/70 00:00      
RE: Keil C - How to place Structure on Port            01/01/70 00:00      
RE: Keil C - How to place Structure on Port            01/01/70 00:00      
RE: Keil C - How to place Structure on Port            01/01/70 00:00      
RE: Keil C - How to place Structure on Port            01/01/70 00:00      
RE: Keil C - How to place Structure on Port            01/01/70 00:00      
RE: Keil C - Andy            01/01/70 00:00      
RE: Keil C - Andy            01/01/70 00:00      
RE: Keil C - Peter            01/01/70 00:00      
RE: Keil C - Peter            01/01/70 00:00      
RE: Keil C - Michael            01/01/70 00:00      
RE: Keil C - Peter            01/01/70 00:00      
RE: Keil C - How to place Structure on Port            01/01/70 00:00      
RE: Keil C - How to place Structure on Port            01/01/70 00:00      
RE: ANSI Bitfields            01/01/70 00:00      

Back to Subject List