mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-10-14 00:37:44 -04:00
Add volatile qualifier (#1283)
Add volatile qualifier This is needed to ensure that the memory mapped address it always read. Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
This commit is contained in:
parent
b3e6cff1f2
commit
28a20d5a69
2 changed files with 4 additions and 3 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -11,6 +11,7 @@
|
||||||
[Oo]bj/
|
[Oo]bj/
|
||||||
[Ll]og/
|
[Ll]og/
|
||||||
[Ll]ogs/
|
[Ll]ogs/
|
||||||
|
[Bb]uild/
|
||||||
|
|
||||||
# CodeWarrior temporary files
|
# CodeWarrior temporary files
|
||||||
*.tdt
|
*.tdt
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
*
|
*
|
||||||
* https://www.FreeRTOS.org
|
* https://www.FreeRTOS.org
|
||||||
* https://www.github.com/FreeRTOS
|
* https://github.com/FreeRTOS
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -54,12 +54,12 @@
|
||||||
|
|
||||||
static uint8_t readb( uintptr_t addr )
|
static uint8_t readb( uintptr_t addr )
|
||||||
{
|
{
|
||||||
return *( (uint8_t *) addr );
|
return *( (volatile uint8_t *) addr );
|
||||||
}
|
}
|
||||||
|
|
||||||
static void writeb( uint8_t b, uintptr_t addr )
|
static void writeb( uint8_t b, uintptr_t addr )
|
||||||
{
|
{
|
||||||
*( (uint8_t *) addr ) = b;
|
*( (volatile uint8_t *) addr ) = b;
|
||||||
}
|
}
|
||||||
|
|
||||||
void vOutNS16550( struct device *dev, unsigned char c )
|
void vOutNS16550( struct device *dev, unsigned char c )
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue