mirror of
https://github.com/FreeRTOS/FreeRTOS.git
synced 2025-12-10 20:22:11 +08: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:
committed by
GitHub
parent
b3e6cff1f2
commit
28a20d5a69
1
.gitignore
vendored
1
.gitignore
vendored
@@ -11,6 +11,7 @@
|
||||
[Oo]bj/
|
||||
[Ll]og/
|
||||
[Ll]ogs/
|
||||
[Bb]uild/
|
||||
|
||||
# CodeWarrior temporary files
|
||||
*.tdt
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
* https://www.FreeRTOS.org
|
||||
* https://www.github.com/FreeRTOS
|
||||
* https://github.com/FreeRTOS
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -54,12 +54,12 @@
|
||||
|
||||
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 )
|
||||
{
|
||||
*( (uint8_t *) addr ) = b;
|
||||
*( (volatile uint8_t *) addr ) = b;
|
||||
}
|
||||
|
||||
void vOutNS16550( struct device *dev, unsigned char c )
|
||||
|
||||
Reference in New Issue
Block a user