| ??? 07/20/00 19:54 Read: times |
#3923 - passing info to library |
I want to create a generic display driver based on a 7219 IC using an 80C32. Suppose I need to prime the library code with the port locations that will serve as clock and data. I wnat this to be generic to promote reuse.
Basically what I want to do is something like this. APPLICATION 1: void main(void){ Init7219(P1^3, P1^4); DispData(0x03); } APPLICATION 2: void main(void){ Init7219(P1^6, P1^2); DispData(0x03); } LIBRARY: static serclk; static serdata; Init7219(clk, data){ //assing clk & data to use serclk = clk; serdata = data; } DispData(uchar dat){ //clock out data...assembler mov a, dat rlc a mov serdata, c setb clk clrb clk etc.... } Any ideas would be much appreciated. Thanks, Rich |
| Topic | Author | Date |
| passing info to library | 01/01/70 00:00 | |
| RE: passing info to library | 01/01/70 00:00 | |
| RE: passing info to library | 01/01/70 00:00 | |
RE: passing info to library | 01/01/70 00:00 |



