Equivalent functions of kernel32 in linux - Linux

This is a discussion on Equivalent functions of kernel32 in linux - Linux ; Hi, I need to develop a kernel level library to communicate with the serial port. My problem is I did that for windows with kernel.32 calls but what are the equivalent functions of CreateFile(), ReadFile()...in Linux? Thanks you...

+ Reply to Thread
Results 1 to 4 of 4

Thread: Equivalent functions of kernel32 in linux

  1. Equivalent functions of kernel32 in linux

    Hi,

    I need to develop a kernel level library to communicate with the serial
    port. My problem is I did that for windows with kernel.32 calls but
    what are the equivalent functions of CreateFile(), ReadFile()...in
    Linux?

    Thanks you


  2. Re: Equivalent functions of kernel32 in linux

    In comp.os.linux.development.system Vins :
    > Hi,


    > I need to develop a kernel level library to communicate with the serial
    > port. My problem is I did that for windows with kernel.32 calls but
    > what are the equivalent functions of CreateFile(), ReadFile()...in
    > Linux?


    As starting guide:

    Serial HOWTO
    http://tldp.org/HOWTO/Serial-HOWTO.html

    Serial Programming HOWTO
    http://tldp.org/HOWTO/Serial-Program...WTO/index.html

    A 'man -k serial' might provide additional info. Checking
    Documentation/serial (inside a Linux kernel tarball) has although
    info.

    Good luck

    --
    Michael Heiming (X-PGP-Sig > GPG-Key ID: EDD27B94)
    mail: echo zvpunry@urvzvat.qr | perl -pe 'y/a-z/n-za-m/'
    #bofh excuse 91: Mouse chewed through power cable

  3. Re: Equivalent functions of kernel32 in linux

    Vins wrote:
    > Hi,
    >
    > I need to develop a kernel level library to communicate with the serial
    > port.


    Chances are that no, you don't. A kernel level library to communicate
    with the serial port is called a "driver". Unless you are working with
    some exotic board that has a strange new UART chip, your kernel has
    that driver already.

    > My problem is I did that for windows with kernel.32 calls but


    So in other words ``that'' was not kernel-level programming. You were
    calling Win32 functions in a DLL from the Windows equivalent of user
    space.

    > what are the equivalent functions of CreateFile(), ReadFile()...in
    > Linux?


    open and read: functions as old as Unix itself. Good grief!


  4. Re: Equivalent functions of kernel32 in linux

    Vins wrote:

    > Hi,
    >
    > I need to develop a kernel level library to communicate with the serial
    > port. My problem is I did that for windows with kernel.32 calls but
    > what are the equivalent functions of CreateFile(), ReadFile()...in
    > Linux?
    >
    > Thanks you


    As others have pointed out, you probably
    don't want a "kernel level" library. That
    would be a driver.

    If you truly must use a UART from kernel
    space (inside a device driver), look up
    line discipline drivers.

    Kind regards,

    Iwo


+ Reply to Thread