MACE: add MaceEnet namespace.

This commit is contained in:
Maxim Poliakovski 2022-03-09 18:03:58 +01:00
parent e913f39812
commit 6d004f0bf8
2 changed files with 6 additions and 0 deletions

View File

@ -26,6 +26,8 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
#include <cinttypes>
using namespace MaceEnet;
uint8_t MaceController::read(uint8_t reg_offset)
{
switch(reg_offset) {

View File

@ -32,6 +32,8 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
// MACE registers offsets
// Refer to the Am79C940 datasheet for details
namespace MaceEnet {
enum MaceReg : uint8_t {
Rcv_FIFO = 0,
Xmit_FIFO = 1,
@ -62,6 +64,8 @@ enum MaceReg : uint8_t {
Rsrvd_Test_2 = 0x1F, // not used in Macintosh?
};
}; // namespace MaceEnet
class MaceController {
public:
MaceController(uint16_t id) { this->chip_id = id; };