how to use volatile ,and why to use volatile ,and where we shoud use volatile !

thank you !
my friends!

Parents
  • You really should look at a 'C' book for the answer to this.

    However, in general, use volatile for any variable or pointer accessed both inside and outside an ISR. Use volatile for any variable which resides at a memory address whose contents could be changed by something outwith your program.

    Stefan

Reply
  • You really should look at a 'C' book for the answer to this.

    However, in general, use volatile for any variable or pointer accessed both inside and outside an ISR. Use volatile for any variable which resides at a memory address whose contents could be changed by something outwith your program.

    Stefan

Children
No data
More questions in this forum