diff options
Diffstat (limited to 'firmware/os/platform/native/inc')
-rw-r--r-- | firmware/os/platform/native/inc/plat/app.h | 26 | ||||
-rw-r--r-- | firmware/os/platform/native/inc/plat/crc.h | 3 | ||||
-rw-r--r-- | firmware/os/platform/native/inc/plat/plat.h | 32 | ||||
-rw-r--r-- | firmware/os/platform/native/inc/plat/pwr.h | 31 | ||||
-rw-r--r-- | firmware/os/platform/native/inc/plat/rtc.h | 40 | ||||
-rw-r--r-- | firmware/os/platform/native/inc/plat/usart.h | 36 | ||||
-rw-r--r-- | firmware/os/platform/native/inc/plat/wdt.h | 30 |
7 files changed, 198 insertions, 0 deletions
diff --git a/firmware/os/platform/native/inc/plat/app.h b/firmware/os/platform/native/inc/plat/app.h new file mode 100644 index 00000000..5617672c --- /dev/null +++ b/firmware/os/platform/native/inc/plat/app.h @@ -0,0 +1,26 @@ +/* + * Copyright (C) 2016 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef _PLAT_LNX_APP_H_ +#define _PLAT_LNX_APP_H_ + +struct PlatAppInfo { + int dummy; + //todo +}; + +#endif + diff --git a/firmware/os/platform/native/inc/plat/crc.h b/firmware/os/platform/native/inc/plat/crc.h new file mode 100644 index 00000000..2c846cbb --- /dev/null +++ b/firmware/os/platform/native/inc/plat/crc.h @@ -0,0 +1,3 @@ +#include <nanohub/crc.h> + +#define crc32 soft_crc32 diff --git a/firmware/os/platform/native/inc/plat/plat.h b/firmware/os/platform/native/inc/plat/plat.h new file mode 100644 index 00000000..5cda58f9 --- /dev/null +++ b/firmware/os/platform/native/inc/plat/plat.h @@ -0,0 +1,32 @@ +/* + * Copyright (C) 2016 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef _LINUX_PLAT_H_ +#define _LINUX_PLAT_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +static inline void platWake(void) +{ +} + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/firmware/os/platform/native/inc/plat/pwr.h b/firmware/os/platform/native/inc/plat/pwr.h new file mode 100644 index 00000000..8ef4131e --- /dev/null +++ b/firmware/os/platform/native/inc/plat/pwr.h @@ -0,0 +1,31 @@ +/* + * Copyright (C) 2016 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef _LNX_HWR_H_ +#define _LNX_HWR_H_ + +#ifdef __cplusplus +extern "C" { +#endif + + + +#ifdef __cplusplus +} +#endif + +#endif + diff --git a/firmware/os/platform/native/inc/plat/rtc.h b/firmware/os/platform/native/inc/plat/rtc.h new file mode 100644 index 00000000..38b698aa --- /dev/null +++ b/firmware/os/platform/native/inc/plat/rtc.h @@ -0,0 +1,40 @@ +/* + * Copyright (C) 2016 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef _LNX_RTC_H_ +#define _LNX_RTC_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +#include <stdint.h> +#include <seos.h> + +#define RTC_ERR_TOO_BIG -1 +#define RTC_ERR_TOO_SMALL -2 +#define RTC_ERR_INTERNAL -3 +#define RTC_ERR_ACCURACY_UNMET -4 + +void rtcInit(void); +int rtcSetWakeupTimer(uint64_t delay, int ppm); +uint64_t rtcGetTime(void); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/firmware/os/platform/native/inc/plat/usart.h b/firmware/os/platform/native/inc/plat/usart.h new file mode 100644 index 00000000..40516d46 --- /dev/null +++ b/firmware/os/platform/native/inc/plat/usart.h @@ -0,0 +1,36 @@ +/* + * Copyright (C) 2016 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef _LNX_USART_H_ +#define _LNX_USART_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +#include <stdint.h> + +struct usart +{ + uint8_t unit; +}; + +#ifdef __cplusplus +} +#endif + +#endif + diff --git a/firmware/os/platform/native/inc/plat/wdt.h b/firmware/os/platform/native/inc/plat/wdt.h new file mode 100644 index 00000000..430a385f --- /dev/null +++ b/firmware/os/platform/native/inc/plat/wdt.h @@ -0,0 +1,30 @@ +/* + * Copyright (C) 2016 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef _LNX_WDT_H_ +#define _LNX_WDT_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +void wdtInit(){} + +#ifdef __cplusplus +} +#endif + +#endif |