![](/media/cache/profiles/f93486bfff38ca69d76d85c089569a09.50x50_q85.jpg)
C1541-III mbed edition
IEC_bus.h@1:0cbbb66a6100, 2011-08-22 (annotated)
- Committer:
- gertk
- Date:
- Mon Aug 22 21:11:59 2011 +0000
- Revision:
- 1:0cbbb66a6100
- Parent:
- 0:28557a4d2215
updated the nRESET pin to an interrupt capable pin (p29)
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
gertk | 0:28557a4d2215 | 1 | #ifndef IEC_BUS_INCLUDED |
gertk | 0:28557a4d2215 | 2 | #define IEC_BUS_INCLUDED |
gertk | 0:28557a4d2215 | 3 | |
gertk | 0:28557a4d2215 | 4 | |
gertk | 0:28557a4d2215 | 5 | /*defines*/ |
gertk | 0:28557a4d2215 | 6 | /*-------*/ |
gertk | 0:28557a4d2215 | 7 | /*IEC commandset: the talker requests the addresses device to become a ...-er*/ |
gertk | 0:28557a4d2215 | 8 | #define LISTEN 0x20 /*base address, device 0-30*/ |
gertk | 0:28557a4d2215 | 9 | #define UNLISTEN 0x3F /*base address, n/a*/ |
gertk | 0:28557a4d2215 | 10 | #define TALK 0x40 /*base address, device 0-30*/ |
gertk | 0:28557a4d2215 | 11 | #define UNTALK 0x5F /*base address, n/a*/ |
gertk | 0:28557a4d2215 | 12 | #define DATA 0x60 /*base address, secondary address 0-15 (this is in some documentation also refered to as OPEN_CHANNEL)*/ |
gertk | 0:28557a4d2215 | 13 | #define CLOSE 0xE0 /*base address, secondary address 0-15*/ |
gertk | 0:28557a4d2215 | 14 | #define OPEN 0xF0 /*base address, secondary address 0-15*/ |
gertk | 0:28557a4d2215 | 15 | |
gertk | 0:28557a4d2215 | 16 | #define TIMINGS_DEFAULT 10 |
gertk | 0:28557a4d2215 | 17 | #define TIMINGS_DTV 11 |
gertk | 0:28557a4d2215 | 18 | #define TIMINGS_VIC20 12 |
gertk | 0:28557a4d2215 | 19 | extern int IEC_CLOCK(); |
gertk | 0:28557a4d2215 | 20 | extern int IEC_DATA(); |
gertk | 0:28557a4d2215 | 21 | extern int IEC_ATN(); |
gertk | 1:0cbbb66a6100 | 22 | extern int IEC_RESET(); |
gertk | 1:0cbbb66a6100 | 23 | extern int IEC_SRQ(); |
gertk | 1:0cbbb66a6100 | 24 | |
gertk | 0:28557a4d2215 | 25 | extern void IEC_ATN_REL(); |
gertk | 0:28557a4d2215 | 26 | extern void IEC_ATN_PULL(); |
gertk | 0:28557a4d2215 | 27 | extern void IEC_DATA_REL(); |
gertk | 0:28557a4d2215 | 28 | extern void IEC_CLOCK_REL(); |
gertk | 0:28557a4d2215 | 29 | extern void IEC_DATA_PULL(); |
gertk | 0:28557a4d2215 | 30 | extern void IEC_CLOCK_PULL(); |
gertk | 1:0cbbb66a6100 | 31 | extern void IEC_SRQ_REL(); |
gertk | 1:0cbbb66a6100 | 32 | extern void IEC_SRQ_PULL(); |
gertk | 1:0cbbb66a6100 | 33 | |
gertk | 0:28557a4d2215 | 34 | |
gertk | 0:28557a4d2215 | 35 | /*routines*/ |
gertk | 0:28557a4d2215 | 36 | /*--------*/ |
gertk | 0:28557a4d2215 | 37 | void InitIEC(void); |
gertk | 0:28557a4d2215 | 38 | void SetIEC_timings(unsigned char settings); |
gertk | 0:28557a4d2215 | 39 | void FreeIEC(void); |
gertk | 0:28557a4d2215 | 40 | |
gertk | 0:28557a4d2215 | 41 | unsigned char IEC_receive(unsigned char frame_handshake); |
gertk | 0:28557a4d2215 | 42 | unsigned char IEC_send(unsigned char data); |
gertk | 0:28557a4d2215 | 43 | unsigned char IEC_monitor(void); |
gertk | 0:28557a4d2215 | 44 | void IEC_send_string(const unsigned char *inputstring); |
gertk | 0:28557a4d2215 | 45 | void IEC_send_number_as_ASCII(unsigned char number); |
gertk | 0:28557a4d2215 | 46 | void IEC_turnaround(void); |
gertk | 0:28557a4d2215 | 47 | void IEC_undoturnaround(void); |
gertk | 0:28557a4d2215 | 48 | void IEC_letgo(void); |
gertk | 0:28557a4d2215 | 49 | unsigned char CheckForCommand(unsigned char *outputcommand, unsigned char frame_handshake); |
gertk | 0:28557a4d2215 | 50 | |
gertk | 0:28557a4d2215 | 51 | #endif |
gertk | 0:28557a4d2215 | 52 | |
gertk | 0:28557a4d2215 | 53 | |
gertk | 0:28557a4d2215 | 54 | |
gertk | 0:28557a4d2215 | 55 | |
gertk | 0:28557a4d2215 | 56 | |
gertk | 0:28557a4d2215 | 57 |