mirror of
				https://git.suyu.dev/suyu/suyu.git
				synced 2025-11-04 12:34:39 +08:00 
			
		
		
		
	added an "Update" method to update all hardware
This commit is contained in:
		
							parent
							
								
									9c2355ba4f
								
							
						
					
					
						commit
						6433f4d6f9
					
				@ -24,6 +24,7 @@
 | 
			
		||||
 | 
			
		||||
#include "log.h"
 | 
			
		||||
#include "hw/hw.h"
 | 
			
		||||
#include "hw/hw_lcd.h"
 | 
			
		||||
 | 
			
		||||
namespace HW {
 | 
			
		||||
 | 
			
		||||
@ -49,8 +50,14 @@ template void Write<const u32>(u32 addr, const u32 data);
 | 
			
		||||
template void Write<const u16>(u32 addr, const u16 data);
 | 
			
		||||
template void Write<const u8>(u32 addr, const u8 data);
 | 
			
		||||
 | 
			
		||||
/// Update hardware
 | 
			
		||||
void Update() {
 | 
			
		||||
    LCD::Update();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/// Initialize hardware
 | 
			
		||||
void Init() {
 | 
			
		||||
    LCD::Init();
 | 
			
		||||
    NOTICE_LOG(HW, "Hardware initialized OK");
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -32,6 +32,9 @@ inline void Read(T &var, const u32 addr);
 | 
			
		||||
template <typename T>
 | 
			
		||||
inline void Write(u32 addr, const T data);
 | 
			
		||||
 | 
			
		||||
/// Update hardware
 | 
			
		||||
void Update();
 | 
			
		||||
 | 
			
		||||
/// Initialize hardware
 | 
			
		||||
void Init();
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user