git subrepo clone git@git.pcmuhely.hu:mississippi/mississippi-mcu-platform-x86_gtest.git platforms/test
subrepo: subdir: "platforms/test" merged: "a470f35" upstream: origin: "git@git.pcmuhely.hu:mississippi/mississippi-mcu-platform-x86_gtest.git" branch: "master" commit: "a470f35" git-subrepo: version: "0.4.0" origin: "https://github.com/ingydotnet/git-subrepo" commit: "7cac75d"
This commit is contained in:
parent
62afeabbbc
commit
2c3fbb4db8
281 changed files with 114282 additions and 0 deletions
39
platforms/test/platform/cmsis.h
Normal file
39
platforms/test/platform/cmsis.h
Normal file
|
@ -0,0 +1,39 @@
|
|||
/*
|
||||
* cmsis.h
|
||||
*
|
||||
* Created on: Nov 22, 2019
|
||||
* Author: abody
|
||||
*/
|
||||
|
||||
#ifndef PLATFORM_CMSIS_H_
|
||||
#define PLATFORM_CMSIS_H_
|
||||
#include <stddef.h>
|
||||
#include <inttypes.h>
|
||||
#include <platform/mockme.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define __IO volatile
|
||||
#define SET_BIT(REG, BIT) ((REG) |= (BIT))
|
||||
#define CLEAR_BIT(REG, BIT) ((REG) &= ~(BIT))
|
||||
#define READ_BIT(REG, BIT) ((REG) & (BIT))
|
||||
#define CLEAR_REG(REG) ((REG) = (0x0))
|
||||
#define WRITE_REG(REG, VAL) ((REG) = (VAL))
|
||||
#define READ_REG(REG) ((REG))
|
||||
#define MODIFY_REG(REG, CLEARMASK, SETMASK) WRITE_REG((REG), (((READ_REG(REG)) & (~(CLEARMASK))) | (SETMASK)))
|
||||
|
||||
void __disable_irq();
|
||||
uint32_t __get_PRIMASK();
|
||||
void __set_PRIMASK(uint32_t priMask);
|
||||
|
||||
DECLARE_MOCK(__disable_irq);
|
||||
DECLARE_MOCK(__get_PRIMASK);
|
||||
DECLARE_MOCK(__set_PRIMASK);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* PLATFORM_CMSIS_H_ */
|
Loading…
Add table
Add a link
Reference in a new issue