Skip to content

Remove hardware dependence in portmacros.h #1112

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Aug 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions portable/CCS/MSP430X/port.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@
*
*/

/* Hardware includes. */
#include "msp430.h"

/* Scheduler includes. */
#include "FreeRTOS.h"
#include "task.h"
Expand Down
9 changes: 3 additions & 6 deletions portable/CCS/MSP430X/portmacro.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,6 @@
*-----------------------------------------------------------
*/

/* Hardware includes. */
#include "msp430.h"

/* Type definitions. */
#define portCHAR char
#define portFLOAT float
Expand Down Expand Up @@ -75,8 +72,8 @@ typedef unsigned short UBaseType_t;
/*-----------------------------------------------------------*/

/* Interrupt control macros. */
#define portDISABLE_INTERRUPTS() _disable_interrupt(); _nop()
#define portENABLE_INTERRUPTS() _enable_interrupt(); _nop()
#define portDISABLE_INTERRUPTS() __asm volatile ( " DINT\n" " NOP" )
#define portENABLE_INTERRUPTS() __asm volatile ( " NOP\n" " EINT\n" " NOP" )
/*-----------------------------------------------------------*/

/* Critical section control macros. */
Expand Down Expand Up @@ -126,7 +123,7 @@ extern void vPortYield( void );
#define portBYTE_ALIGNMENT 2
#define portSTACK_GROWTH ( -1 )
#define portTICK_PERIOD_MS ( ( TickType_t ) 1000 / configTICK_RATE_HZ )
#define portNOP() __no_operation()
#define portNOP() __asm volatile ( " NOP" )
/*-----------------------------------------------------------*/

/* Task function macros as described on the FreeRTOS.org WEB site. */
Expand Down
3 changes: 3 additions & 0 deletions portable/IAR/MSP430X/port.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@
#include "FreeRTOS.h"
#include "task.h"

/* Hardware includes. */
#include "msp430.h"

/*-----------------------------------------------------------
* Implementation of functions defined in portable.h for the MSP430X port.
*----------------------------------------------------------*/
Expand Down
9 changes: 3 additions & 6 deletions portable/IAR/MSP430X/portmacro.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,6 @@
*-----------------------------------------------------------
*/

/* Hardware includes. */
#include "msp430.h"

/* Type definitions. */
#define portCHAR char
#define portFLOAT float
Expand Down Expand Up @@ -75,8 +72,8 @@ typedef unsigned short UBaseType_t;
/*-----------------------------------------------------------*/

/* Interrupt control macros. */
#define portDISABLE_INTERRUPTS() _DINT(); _NOP()
#define portENABLE_INTERRUPTS() _EINT(); _NOP()
#define portDISABLE_INTERRUPTS() __asm volatile ( "DINT\n" "NOP" )
#define portENABLE_INTERRUPTS() __asm volatile ( "NOP\n" "EINT\n" "NOP" )
/*-----------------------------------------------------------*/

/* Critical section control macros. */
Expand Down Expand Up @@ -126,7 +123,7 @@ extern void vPortYield( void );
#define portBYTE_ALIGNMENT 2
#define portSTACK_GROWTH ( -1 )
#define portTICK_PERIOD_MS ( ( TickType_t ) 1000 / configTICK_RATE_HZ )
#define portNOP() __no_operation()
#define portNOP() __asm volatile ( "NOP" )
/*-----------------------------------------------------------*/

/* Task function macros as described on the FreeRTOS.org WEB site. */
Expand Down
Loading