sequences for writing embedded drivers [closed] - c

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 years ago.
Improve this question
I'm really confused when I'm writing a driver? just need to know which file should I write first header file, or the configuration file otherwise the code file. just for example keypad driver using C. if there any resources to understand more these steps for writing driver I will be very thankful

Be it a driver development or application development,
Very first step is be clear with requirement,
Then have a proper design and then go for coding.
Note that coding without design is a disaster.
Which file to start with is your question?
If you are so much confused just start with code file.
Keep entire code in that file.
Later on you can re arrange your code to different files like header file , Config file , code file etc...

Related

Importing a C project on Node-Red [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 2 years ago.
Improve this question
I have a C project (hex file) and I would like to use in my node-red project. by creating my own node in node-red that's call this project and exchange data with it.
knowing that I don't have the code source .
My questions are:
Is it possible?
If so, How I can do it ? I have read some docs about N-API, but I don't know if it's usefull.
Without knowing a lot more about what your C program does this is hard to answer.
But you have 2 possible choices here
If your application can receive data from stdin or as command line arguments and output to stdout then you can use the exec or daemon nodes to just run the exe file
You can build a NodeJS node that wraps your C program using the NAPI and then build a Node-RED Node that uses that node and makes method calls against your C library. If you take this path you will need to get the NodeJS module working first.

Build a File Monitoring System [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I have just started programming and would like to implement a file monitoring system from scratch in C.
I have used the Watch Service API in java but I would like to learn how to build one from scratch. I would really appreciate some assistance and guidance.
Thanks.
You can:
either rely on existing system calls that will push you notifications on file system modifications (eg: inotify)
implement your own kernel module that will intercept file system modification and notify you (if you really want to reimplement the wheel)
use a polling-approach, rebuild the filesystem tree in-memory and compare it every second or so. This will be very cpu/io/memory consuming, but it can be instructive.

Read and rename a file from a folder in C [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
I want to make a program that reads the name of a (.mp3) file from a folder and then re-name it. I want to know how to do so.
Please give me an example on how to read a (.mp3) file name and save it, and also point to me things that I should know to make this program.
I'm on windows and using VS2013.
You might like to use the rename() function.
To scan a directory you can use a combination of FindFirstFile() and FindNextFile() calls.

What are configuration files? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
What are configuration files? What are their use in c programs?
Additional question: What does it mean to have an error which states "Cannot open configuration file"?
A configuration file could be any file which the program uses to persistently store options, state, or data between executions. The concept is not specific to C and is probably universal to most programming languages. It is impossible, without knowing exactly what program you are dealing with, to figure out what they are, where they would be stored, or why the program wouldn't be able to open it.

Porting old C project into C++/CX [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
I'm rather new to C++/CX, and right now have an old C project which I need to port into C++/CX.
The output are flushed into text-file or standard output, but it's not that important right now since I can just take them into the Message Dialog there.
My question is that, do you have any tips for porting this project?
I just tried to copy a C file into CPP but failed to compile.
I mean, do I need to wrap the old functions into some kind of Class structure now?
Thanks in advance!
For the differences between C and C++, a starting point is David Tribble's "C99 vs C++98". Without any more details (original C environment, current C++ environment, some details on exact error messages) it is next to impossible to answer the question.

Resources