EmbLogic's Blog

algorithm to write initialization function for character deriver

follow these simple steps to initialize your character driver….
1. use module __init(initialization_function_name)
this is a micro which takes function name as argument.
2. static int initialization_function_name(void)
this is the defination of micro…
in this defination follow following steps..
a. register your char device using register_chardev_region().
b. allocate memory for the sculldev.
c. initialize your device using cdev_init() and add your device using cdev_add() functions.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>