|
очень часто делают так:
(в памяти структура места не занимает)
/*
* Parallel port registers.
*/
typedef struct {
unsigned char pad1 [3];
u8_t cfg1;
unsigned char pad2 [16];
u8_t cfg2;
u8_t cfg3;
unsigned char pad3 [20];
u8_t cfg4;
} PPort_t;
#define PPort ((PPort_t *) 0x00002)
PPort->cfg1 = 0x01;
PPort->cfg2 = 0x02;
PPort->cfg3 = 0x03;
E-mail: info@telesys.ru