Hello all elite CodeBlockers and I got a silly problem ><
I am recently studying C++ with this lovely CodeBlock/MingGW myself and playing around with the watchdog timer register.
Somehow I meet some issue on the outputb, which used to work on my old C compiler.
The problem it shows an error message >D:\Study\C_C++\CodeBlocks\WDT\main.cpp:13: error: 'outportb' was not declared in this scope
Why is it not in the scope? Following is my code. Hope anyone can help me out here ><
Maybe I am missing something important here?
#include <stdio.h>
#include <dos.h>
#include <conio.h>
#define SUPERIO_PORT 0x2E
#define WDT_SET 0xF5
#define WDT_VALUE 0xF6
int main()
{
//Enter SuperIO Configuration
outportb(SUPERIO_PORT, 0x87);
outportb(SUPERIO_PORT, 0x87);
//Set LDN
outportb(SUPERIO_PORT,0x07);
outportb(SUPERIO_PORT+1 ,0x08);
//Set WDT setting
outportb(WDT_SET,0x04); //Use the second to come down
//If choose the Minute, change value to 0x0C
//Set WDT sec/min
outportb(WDT_VALUE,0x05); //Set 5 seconds
return 0;
}
Have a great day all!