TT Zephyr Platforms 18.11.99
Tenstorrent Firmware
Loading...
Searching...
No Matches
reg.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2024 Tenstorrent AI ULC
3 * SPDX-License-Identifier: Apache-2.0
4 */
5
6#ifndef REG_H
7#define REG_H
8
9#include <stdint.h>
10
11#if CONFIG_BOARD_NATIVE_SIM
13void WriteReg(uint32_t addr, uint32_t val);
14#else
15static inline uint32_t ReadReg(uint32_t addr)
16{
17 return *((uint32_t volatile *)addr);
18}
19static inline void WriteReg(uint32_t addr, uint32_t val)
20{
21 *((uint32_t volatile *)addr) = val;
22}
23#endif
24#endif
static void WriteReg(uint32_t addr, uint32_t val)
Definition reg.h:19
static uint32_t ReadReg(uint32_t addr)
Definition reg.h:15
__UINT32_TYPE__ uint32_t