Difference: DTCLibrary (3 vs. 4)

Revision 422 Jun 2010 - MichaelDimitriyev

Line: 1 to 1
 
META TOPICPARENT name="DTCSoftware"
The DTC library, dtcreg, contains a set of functions that facilitate reading from and writing to registers on the DTC.
Line: 66 to 66
  dtc_read8/dtc_read32
Added:
>
>
Specialized for reading from 8-bit registers and 32-bit registers (four subsequent 8-bit registers). Can also read from a number of subsequent registers.

int dtc_read8(hDTC handle, int regAddr, uint8_t dat[], int count) / dtc_readx8(..., char *hexRegAddr, ..., ...)

The third parameter requires an array which will hold the amount of data specified by count, which specifies the number of subsequent registers to read (count = 1 reads one).

int dtc_read32(hDTC handle, int regAddr, uint32_t dat[], int count) / dtc_readx32(..., char *hexRegAddr, ..., ...)

Here, count refers to the number of 32-bit registers to read from, that is, 4*count will be the total number of 8-bit registers to be read.

  dtc_write8/dtc_write32
Added:
>
>
Similar to dtc_read8/dtc_read32.

int dtc_write8(hDTC handle, int regAddr, uint8_t dat[], int count) / dtc_writex8(..., char *hexRegAddr, ..., ...)

Takes an array of data in the third argument and writes to a number of subsequent registers specified by count. So, dat[0] is written to the register specified by regAddr, dat[1] is written to regAddr+1, ..., dat[count-1] is written to regAddr+count-1.

int dtc_write32(hDTC handle, int regAddr, uint32_t dat[], int count) / dtc_writex32(..., char *hexRegAddr, ..., ...)

dat[0] is written to registers regAddr through regAddr+3, dat[1] is written to regAddr+4 through regAddr+7, ..., dat[count-1] is written to regAddr+4*(count-1) through regAddr+4*(count-1)+3.

 

Compiling

Changed:
<
<
dtcreg is built on ipmitool and is a wrapper for some of its structures and functions; so while using it does not require knowledge of the ipmitool code, programs built with it must include several additional libraries which are required by ipmitool.
>
>
dtcreg is built on ipmitool and is a wrapper for some of its structures and functions; so while using it does not require knowledge of the ipmitool code, programs built with it must include several additional libraries which are required by ipmitool. There is a makefile included in the dtcreg directory. A description of the header files and libraries and where they are located is at ipmitool.

Header files (relative to top ipmitool directory):

(include/ipmitool/) ipmi.h, ipmi_intf.h, ipmi_main.h, ipmi_raw.h, ipmi_strings.h

(src/plugins/) lan/lan.h

Libraries (relative to top ipmitool directory):

lib/.libs/libipmitool.a src/plugins/.libs/libintf.a src/plugins/lan/.libs/libintf_lan.a

(other) libncurses, libcrypto, libm

 

-- MichaelDimitriyev - 16 Jun 2010 \ No newline at end of file

 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2020 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback