/alps/pcitool

To get this branch, use:
bzr branch http://darksoft.org/webbzr/alps/pcitool

« back to all changes in this revision

Viewing changes to protocols/software.h

  • Committer: Suren A. Chilingaryan
  • Date: 2015-11-18 02:25:02 UTC
  • Revision ID: csa@suren.me-20151118022502-2yu6oagexn3048jq
Provide API calls for register and bank address resolution

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
void pcilib_software_registers_close(pcilib_t *ctx, pcilib_register_bank_context_t *bank_ctx);
29
29
 
30
30
/**
 
31
 * this function resolve the virtual address of the register for direct access
 
32
 * @param[in] - ctx the pcilib_t structure runnning
 
33
 * @param[in] - bank_ctx the bank context that was returned by the initialisation function
 
34
 * @param[in] - flags 
 
35
 * @param[in] - addr the adress of the register we want to read
 
36
 * @return virtual address or PCILIB_ADDRESS_INVALID on error 
 
37
 */
 
38
uintptr_t pcilib_software_registers_resolve(pcilib_t *ctx, pcilib_register_bank_context_t *bank_ctx, pcilib_address_resolution_flags_t flags, pcilib_register_addr_t addr);
 
39
 
 
40
/**
31
41
 * this function read the value of a said register in the kernel space.
32
42
 * @param[in] - ctx the pcilib_t structure runnning
33
43
 * @param[in] - bank_ctx the bank context that was returned by the initialisation function
52
62
 * software protocol addition to the protocol api.
53
63
 */
54
64
const pcilib_register_protocol_api_description_t pcilib_software_protocol_api =
55
 
  { PCILIB_VERSION, pcilib_software_registers_open, pcilib_software_registers_close,pcilib_software_registers_read, pcilib_software_registers_write }; /**< we add there the protocol to the list of possible protocols*/
 
65
  { PCILIB_VERSION, pcilib_software_registers_open, pcilib_software_registers_close, pcilib_software_registers_resolve, pcilib_software_registers_read, pcilib_software_registers_write }; 
56
66
#endif /* _PCILIB_EXPORT_C */
57
67
 
58
68
#endif /* _PCILIB_PROTOCOL_SOFTWARE_H */