Browse Source

Add ifndefs to header files

master
garritfra 5 years ago
parent
commit
e825cb53bb
  1. 6
      fb.h
  2. 20
      io.h
  3. 7
      kmain.h

6
fb.h

@ -1,5 +1,5 @@
#ifndef INCLUDE_IO_H
#define INCLUDE_IO_H
#ifndef INCLUDE_FRAMEBUFFER
#define INCLUDE_FRAMEBUFFER
/* The I/O ports */
#define FB_COMMAND_PORT 0x3D4
@ -11,7 +11,7 @@
int write(char *buf, unsigned int len);
extern void outb(unsigned short port, unsigned char data);
/** fb_write_cell:
* Writes a character with the given foreground and background to position i

20
io.h

@ -0,0 +1,20 @@
#ifndef INCLUDE_IO
#define INCLUDE_IO
/** outb
* Write bytes to an I/O port.
*
* @param port The address of the I/O port
*/
extern void outb(unsigned short port, unsigned char data);
/** inb:
* Read a byte from an I/O port.
*
* @param port The address of the I/O port
* @return The read byte
*/
unsigned char inb(unsigned short port);
#endif

7
kmain.h

@ -1 +1,6 @@
int main();
#ifndef INCLUDE_MAIN
#define INCLUDE_MAIN
int main();
#endif
Loading…
Cancel
Save