old-trainOS/include/io.h
Felix Queissner ddbfb0e1aa some stuff.
2015-08-13 14:56:50 +02:00

22 lines
357 B
C

#pragma once
#include <inttypes.h>
#if defined(__cplusplus)
extern "C" {
#endif
/**
* @brief Outputs a byte on the given port.
* @param port The port number.
* @param data The byte to send.
*/
static inline void outb(uint16_t port, uint8_t data)
{
__asm__ volatile ("outb %0, %1" : : "a" (data), "Nd" (port));
}
#if defined(__cplusplus)
}
#endif