void interrupt int_char_in(void)
{
enable();
/* Enable hardware interrupts */
if(int_buf_count < INT_BUF_size) {
*int+ = inportb(RDR); /* Read byte from UART */
int_bu+;
if(int_buf_in >= i INT_BUF_size) int_buf_in = int_buf;
int_buf_ovfl = 0;
}
else {
inportb(RDR);
/* Clear UART interrupt */
int_buf_ovfl = 1;
}
outportb(INT_controller,End_of_interrupt); /* Non-specific EOI */
}
void send_ctlc(void)
{
outportb(MCR,0x8);
/* De-assert DTR */
delay(10);
/* Wait 10 mS for stray characters */
while(!(inportb(LSR) & 0x20)) ; /* Wait on transmitter register */
outportb(THR,0x3);
/* Send ^C */
while(!(inportb(LSR) & 0x40)) ; /* Wait for ^C to be sent */
int_buf_in = int_buf_out = int_buf;
/* Clear int_char_in buffer */
int_buf_count = int_buf_ovfl = 0;
delay(20);
/* 20mS for HP 34401 to clean up */
outportb(MCR,0x9);
/* Assert DTR */
}
RS-232 Operation Using Turbo C
(continued)
Chapter 6 Application Programs
RS-232 Operation Using Turbo C
196
Содержание 34401A
Страница 12: ...1 Quick Start 1 ...
Страница 26: ...2 Front Panel Menu Operation 2 ...
Страница 50: ...3 Features and Functions 3 ...
Страница 103: ...4 Remote Interface Reference 4 ...
Страница 135: ...SCPI Status System 4 Chapter 4 Remote Interface Reference The SCPI Status Model 135 ...
Страница 170: ...5 Error Messages 5 ...
Страница 182: ...6 Application Programs 6 ...
Страница 196: ...7 Measurement Tutorial 7 ...
Страница 214: ...8 Specifications 8 ...
Страница 222: ...Product Dimensions TOP Product Dimensions All dimensions are shown in millimeters 8 Chapter 8 Specifications 223 ...