Re:Delay
Posted: Wed Oct 02, 2002 1:46 pm
I have a question about tim robinsons C code he provided.
When I try to compile the example, I get a
'out' : undeclared identifier
What is the problem?
Heres the code:
/*! \brief Sets up the PC's programmable timer to issue interrupts at HZ
* (100 Hz) instead of the default ~18.2 Hz.
* \param hz The required clock frequency, in hertz
*/
void i386PitInit(unsigned hz)
{
unsigned short foo = (3579545L / 3) / hz;
/* Reprogram the 8253 timer chip to run at 'HZ', instead of 18 Hz */
out(0x43, 0x36); /* Channel 0, LSB/MSB, mode 3, binary */
out(0x40, foo & 0xFF); /* LSB */
out(0x40, foo >> ; /* MSB */
}
When I try to compile the example, I get a
'out' : undeclared identifier
What is the problem?
Heres the code:
/*! \brief Sets up the PC's programmable timer to issue interrupts at HZ
* (100 Hz) instead of the default ~18.2 Hz.
* \param hz The required clock frequency, in hertz
*/
void i386PitInit(unsigned hz)
{
unsigned short foo = (3579545L / 3) / hz;
/* Reprogram the 8253 timer chip to run at 'HZ', instead of 18 Hz */
out(0x43, 0x36); /* Channel 0, LSB/MSB, mode 3, binary */
out(0x40, foo & 0xFF); /* LSB */
out(0x40, foo >> ; /* MSB */
}