blob: 758fca6811d7e50d036c00dd59ce5efef4d77b37 [file] [log] [blame]
/*
* (C) Copyright 2015 Google, Inc.
* All rights reserved.
*
*/
#ifndef VENDOR_GOOGLE_DIAGS_WINDCHARGER_IO_H_
#define VENDOR_GOOGLE_DIAGS_WINDCHARGER_IO_H_
#include <inttypes.h>
#define MEM_DEV_FILE "/dev/mem"
#define FILENAME_SIZE 64
int io_r_field(uint64_t addr, uint32_t* value, uint32_t msb, uint32_t lsb);
int io_w_field(uint64_t addr, uint32_t value, uint32_t msb, uint32_t lsb);
int io_w(uint64_t addr, uint32_t value);
int write_physical_addr(uint64_t addr, uint32_t value);
int read_physical_addr(uint64_t addr, uint32_t* value);
#endif // VENDOR_GOOGLE_DIAGS_WINDCHARGER_IO_H_