summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPrasad Konnur2019-09-16 06:06:33 -0500
committerPrasad Konnur2019-09-16 06:07:17 -0500
commitc7c81c753408be9dec3bfd9830ff861d9bff13a7 (patch)
treefe8d46124bbe667818a783abf2d788822d80e0e0
parent1582f1b11fe43d8d97bb32505a09fbcccb28d99c (diff)
downloadosal-c7c81c753408be9dec3bfd9830ff861d9bff13a7.tar.gz
osal-c7c81c753408be9dec3bfd9830ff861d9bff13a7.tar.xz
osal-c7c81c753408be9dec3bfd9830ff861d9bff13a7.zip
misra c fixes
Signed-off-by: Prasad Konnur <prasadkonnur@ti.com>
-rw-r--r--RegisterIntr.h25
-rw-r--r--SemaphoreP.h38
2 files changed, 41 insertions, 22 deletions
diff --git a/RegisterIntr.h b/RegisterIntr.h
index e2b050d..4e86d44 100644
--- a/RegisterIntr.h
+++ b/RegisterIntr.h
@@ -88,17 +88,26 @@ typedef struct {
88 OsalRegisterIntParams_socmux_t socMuxConfig; 88 OsalRegisterIntParams_socmux_t socMuxConfig;
89} OsalRegisterIntrParams_t; 89} OsalRegisterIntrParams_t;
90 90
91/**
92 * \anchor OsalInterruptRetCode_e
93 * \name Osal Interrupt return Codes
94 * @{
95 */
91/*! 96/*!
92 * @brief Return error codes for Osal Interrupt functions 97 * @brief Return error codes for Osal Interrupt functions
93 */ 98 */
94typedef enum { 99typedef int32_t OsalInterruptRetCode_e;
95 OSAL_INT_SUCCESS=0, 100#define OSAL_INT_SUCCESS ((int32_t) 0)
96 OSAL_INT_ERR_INVALID_PARAMS =-1, /* Invalid input parameters */ 101/* Success return code */
97 OSAL_INT_ERR_HWICREATE=-2, /* Error while registering the Hwi object */ 102#define OSAL_INT_ERR_INVALID_PARAMS ((int32_t) -1)
98 OSAL_INT_ERR_EVENTCOMBINER_REG=-3, /* Error while registering the event combiner to the defaults */ 103/* Invalid input parameters */
99 OSAL_INT_ERR_DELETE=-4 /* Failed to delete a Interrupt handle. */ 104#define OSAL_INT_ERR_HWICREATE ((int32_t) -2)
100} OsalInterruptRetCode_e; 105/* Error while registering the Hwi object */
101 106#define OSAL_INT_ERR_EVENTCOMBINER_REG ((int32_t) -3)
107/* Error while registering the event combiner to the defaults */
108#define OSAL_INT_ERR_DELETE ((int32_t) -4)
109/* Failed to delete a Interrupt handle. */
110/* @} */
102 111
103void Osal_RegisterInterrupt_initParams(OsalRegisterIntrParams_t *interruptRegParams); 112void Osal_RegisterInterrupt_initParams(OsalRegisterIntrParams_t *interruptRegParams);
104/*! 113/*!
diff --git a/SemaphoreP.h b/SemaphoreP.h
index 83a9b72..6bf45e9 100644
--- a/SemaphoreP.h
+++ b/SemaphoreP.h
@@ -64,19 +64,24 @@ extern "C" {
64#include <stdbool.h> 64#include <stdbool.h>
65#include <stddef.h> 65#include <stddef.h>
66 66
67/**
68 * \anchor SemaphoreP_Status
69 * \name Semaphore status code
70 * @{
71 */
67/*! 72/*!
68 * @brief Status codes for SemaphoreP APIs 73 * @brief Status codes for SemaphoreP APIs
69 */ 74 */
70typedef enum SemaphoreP_Status_e { 75typedef int32_t SemaphoreP_Status;
71 /*! API completed successfully */ 76#define SemaphoreP_OK (0)
72 SemaphoreP_OK = 0, 77/*! API completed successfully */
73 /*! API failed */ 78#define SemaphoreP_FAILURE (-(int32_t)1)
74 SemaphoreP_FAILURE = (-(int32_t)1), 79/*! API failed */
75 /*! API failed because of a timeout */ 80#define SemaphoreP_TIMEOUT (-(int32_t)2)
76 SemaphoreP_TIMEOUT = (-(int32_t)2), 81/*! API failed because of a timeout */
77 /*! API failed because of not supported */ 82#define SemaphoreP_UNSUPPORTED (-(int32_t)3)
78 SemaphoreP_UNSUPPORTED =(-(int32_t)3) 83/*! API failed because of not supported */
79} SemaphoreP_Status; 84/* @} */
80 85
81/*! 86/*!
82 * @brief Wait forever define 87 * @brief Wait forever define
@@ -97,13 +102,18 @@ typedef enum SemaphoreP_Status_e {
97 */ 102 */
98typedef void *SemaphoreP_Handle; 103typedef void *SemaphoreP_Handle;
99 104
105/**
106 * \anchor SemaphoreP_Mode
107 * \name Mode of Semaphore
108 * @{
109 */
100/*! 110/*!
101 * @brief Mode of the semaphore 111 * @brief Mode of the semaphore
102 */ 112 */
103typedef enum SemaphoreP_Mode_e { 113typedef uint32_t SemaphoreP_Mode;
104 SemaphoreP_Mode_COUNTING = 0x0, 114#define SemaphoreP_Mode_COUNTING (0x0U)
105 SemaphoreP_Mode_BINARY = 0x1 115#define SemaphoreP_Mode_BINARY (0x1U)
106} SemaphoreP_Mode; 116/* @} */
107 117
108/*! 118/*!
109 * @brief Basic SemaphoreP Parameters 119 * @brief Basic SemaphoreP Parameters