Source file: /~heha/hs/gputils64-210929.zip/libgputils/gpregister.h

#pragma once

/* This file was generated automatically */

// TODO: Remove this
struct gp_bit_t{
  const char *name;
  unsigned address;
};

struct gp_register_t{
  uint16_t addr,mask;
// mask controls bitness etc:
// If high-part is not zero, the value spans more than 1 byte
// If low-part is zero, the mask has special meaning:
//	0x0000	End of register table (?)
//	0x0x00	x (1..15) registers appending "0" to "15"
//	0x1x00	x (1..15) registers appending "1" to "16"
//	0x2x00	x (1..15) registers appending "A" to "P"
//	0x3200	2 registers appending "L" and "H"
//	0x3300	3 registers appending "L", "H", and "U"
//	0x3800	3 registers appending "L", "H", and "U", U with 1 bit
//	0x3F00	3 registers appending "L", "H", and "U", U with 8 bit
//	0x7200	2 registers appending "H" and "L" (Big endian)
  const char *name;
  const char* bitstring;
  const gp_bit_t *bits;	// TODO: Temove this
  const char* bit_name(unsigned Address)const;
  const gp_bit_t* find_bit(unsigned Address)const;
} ;

struct gp_register_table_t{
  const char *name;
//  unsigned register_number;
  const gp_register_t **registers;
  static int _cdecl _mcu_cmp(const void *P1, const void *P2);
  const char* find_reg_name(unsigned Address) const;
  static MFUNC(const gp_register_table_t*) find_mcu(const char*McuName);
  const gp_register_t* find_reg(unsigned Address) const;
};

extern const gp_register_table_t gp_register_db[];
extern const int gp_register_db_size;
Detected encoding: ASCII (7 bit)2