Severson-Group / AMDC-Firmware

Embedded system code (C and Verilog) which runs the AMDC Hardware
http://docs.amdc.dev/firmware
BSD 3-Clause "New" or "Revised" License
31 stars 5 forks source link

Add ability to read AMDS counter values #270

Closed npetersen2 closed 2 years ago

npetersen2 commented 2 years ago

Per #269, this PR provides a solution to read the AMDS counter values external to the driver code.

Example usage

#include "drv/motherboard.h"

// Read the V counter
uint32_t V_counter;
motherboard_get_counters(MOTHERBOARD_1_BASE_ADDR, &V_counter, NULL, NULL);

// Now, V_counter has the counter value from the driver
npetersen2 commented 2 years ago

@Bharat-Ramadas good catch, thanks!