2023-11-08 15:52:36 +00:00
|
|
|
//
|
|
|
|
// InOut.hpp
|
|
|
|
// Clock Signal
|
|
|
|
//
|
|
|
|
// Created by Thomas Harte on 08/11/2023.
|
|
|
|
// Copyright © 2023 Thomas Harte. All rights reserved.
|
|
|
|
//
|
|
|
|
|
2024-01-17 04:34:46 +00:00
|
|
|
#pragma once
|
2023-11-08 15:52:36 +00:00
|
|
|
|
|
|
|
#include "../AccessType.hpp"
|
|
|
|
|
|
|
|
namespace InstructionSet::x86::Primitive {
|
|
|
|
|
|
|
|
template <typename IntT, typename ContextT>
|
|
|
|
void out(
|
2024-12-01 22:51:20 +00:00
|
|
|
const uint16_t port,
|
2023-11-08 15:52:36 +00:00
|
|
|
read_t<IntT> value,
|
|
|
|
ContextT &context
|
|
|
|
) {
|
|
|
|
context.io.template out<IntT>(port, value);
|
|
|
|
}
|
|
|
|
|
|
|
|
template <typename IntT, typename ContextT>
|
|
|
|
void in(
|
2024-12-01 22:51:20 +00:00
|
|
|
const uint16_t port,
|
2023-11-08 15:52:36 +00:00
|
|
|
write_t<IntT> value,
|
|
|
|
ContextT &context
|
|
|
|
) {
|
|
|
|
value = context.io.template in<IntT>(port);
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|