importing a C header into Ada

From: Adrien Plisson (aplisson-news_at_stochastique.net)
Date: 10/19/04


Date: Tue, 19 Oct 2004 16:10:26 +0200

hello,

maybe this topic has already been discussed here, but i can't find any
information about that.

i have a specific hardware (an i/o board) that i have to use in a system i am
developing. unfortunately, the manufacturer of this hardware knows nothing
about Ada and so gives only a C header file and the corresponding .lib file to
interface with the driver.

i know it is possible to import C functions into Ada through Pragma Import, but
the header file is somehow big and i don't want to make any mistake while
writing the functions definitions.

so, is there any piece of software which would automagically convert my C
header into a valid Ada package specification ?

(i am using GNAT 3.15p on windows)

thanks in advance.

-- 
rien


Relevant Pages

  • Re: Preferred OS, processor family for running embedded Ada?
    ... embedded Ada commercially down the line (at which time somebody else ... emulation packages for some of the hardware. ... emulator, then I run it on the real hardware. ... Another area to explore is FPGA programming. ...
    (comp.lang.ada)
  • Re: Help Constructing Fictional Cross-Religious Movement
    ... does not, because the division gives 00.500000000 (carried out to as many zeros as the hardware can take), which leaves a digit free on the left for when the 10 is added. ... PL/I allows explicit settings, by the way. ... In Ada, however, the equivalent formulation is required, not just an available option. ...
    (rec.arts.sf.composition)
  • Re: Not enough parallelism in programming
    ... >> I think the future will produce increasingly many threads in hardware, ... >> Dr. Adrian Wrigley, Cambridge, UK. ... Ada doesn't have 'par' and 'seq' constructs. ... there is a lot more to Ada concurrency than rendezvous ...
    (comp.arch)
  • Re: Not enough parallelism in programming
    ... > constructs into sequential models. ... > forced to use to model and implement inherently parallel systems. ... I'm not sure why Ada hasn't been mentioned here, ... Unfortunately, my hardware doesn't ...
    (comp.arch)
  • Re: [PATCH] MPT FUSION: Delete unused header files.
    ... Its apparent to me that you don't have our hardware, ... I'm the author of the mpt-status user space tool, which queries LSI controllers and reports back the RAID status and the synchronization state; so I have waded through the driver source code quite a lot. ... header file is very helpful to those supporting our hardware, ...
    (Linux-Kernel)