struct Driver { unsigned long count; }; void Driver_Tick(Driver & driver) { driver.count += 1; } unsigned long Driver_getCount(const Driver & driver) { return driver.count; } Driver driver; void setup() { Serial.begin(9600); } void loop() { Driver_Tick(driver); unsigned long count = Driver_getCount(driver); Serial.print("Count: "); Serial.println(count); }