MESH: add MeshScsi namespace.

This commit is contained in:
Maxim Poliakovski 2022-03-09 16:56:52 +01:00
parent 6c564cb720
commit 8d9691cc6f
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> #include <cinttypes>
#include <loguru.hpp> #include <loguru.hpp>
using namespace MeshScsi;
uint8_t MESHController::read(uint8_t reg_offset) uint8_t MESHController::read(uint8_t reg_offset)
{ {
switch(reg_offset) { switch(reg_offset) {

View File

@ -29,6 +29,8 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
// Chip ID returned by the MESH cell inside the Heathrow ASIC // Chip ID returned by the MESH cell inside the Heathrow ASIC
#define HeathrowMESHID 4 #define HeathrowMESHID 4
namespace MeshScsi {
// MESH registers offsets // MESH registers offsets
enum MeshReg : uint8_t { enum MeshReg : uint8_t {
XferCount0 = 0, XferCount0 = 0,
@ -49,6 +51,8 @@ enum MeshReg : uint8_t {
SelTimeOut = 0xF SelTimeOut = 0xF
}; };
}; // namespace MeshScsi
class MESHController { class MESHController {
public: public:
MESHController(uint8_t mesh_id) { this->chip_id = mesh_id; }; MESHController(uint8_t mesh_id) { this->chip_id = mesh_id; };