1
0
mirror of https://github.com/corundum/corundum.git synced 2025-01-16 08:12:53 +08:00
corundum/lib/mqnic/reg_block.h

24 lines
650 B
C
Raw Normal View History

// SPDX-License-Identifier: BSD-2-Clause-Views
2021-12-29 22:31:46 -08:00
/*
* Copyright (c) 2021-2023 The Regents of the University of California
*/
2021-12-29 22:31:46 -08:00
#ifndef REG_BLOCK_H
#define REG_BLOCK_H
#include <stdint.h>
#include <unistd.h>
struct mqnic_reg_block {
2021-12-29 22:31:46 -08:00
uint32_t type;
uint32_t version;
volatile uint8_t *base;
volatile uint8_t *regs;
};
struct mqnic_reg_block *mqnic_enumerate_reg_block_list(volatile uint8_t *base, size_t offset, size_t size);
struct mqnic_reg_block *mqnic_find_reg_block(struct mqnic_reg_block *list, uint32_t type, uint32_t version, int index);
void mqnic_free_reg_block_list(struct mqnic_reg_block *list);
2021-12-29 22:31:46 -08:00
#endif /* REG_BLOCK_H */