Adapted to Lora Semtech + Nucleo
Dependents: LoRaWAN-lmic-app LoRaWAN-lmic-app LoRaWAN-test-10secs LoRaPersonalizedDeviceForEverynet ... more
Fork of lwip_ppp_ethernet by
sys_arch.h
00001 /* sys_arch.h */ 00002 /* 00003 Copyright (C) 2012 ARM Limited. 00004 00005 Permission is hereby granted, free of charge, to any person obtaining a copy of 00006 this software and associated documentation files (the "Software"), to deal in 00007 the Software without restriction, including without limitation the rights to 00008 use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies 00009 of the Software, and to permit persons to whom the Software is furnished to do 00010 so, subject to the following conditions: 00011 00012 The above copyright notice and this permission notice shall be included in all 00013 copies or substantial portions of the Software. 00014 00015 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 00016 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 00017 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 00018 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 00019 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 00020 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 00021 SOFTWARE. 00022 */ 00023 00024 #ifndef SYS_ARCH_H_ 00025 #define SYS_ARCH_H_ 00026 00027 //Architecture-specific configuration 00028 #define LWIP_SEMAPHORES_COUNT 8 00029 #define LWIP_MUTEXES_COUNT 8 00030 #define LWIP_MAILBOXES_COUNT 8 00031 00032 typedef u32_t sys_prot_t; 00033 00034 struct sys_mutex 00035 { 00036 /*Mutex**/ void* pMtx; 00037 int valid; 00038 }; 00039 typedef struct sys_mutex sys_mutex_t; 00040 00041 struct sys_sem 00042 { 00043 /*Semaphore**/ void* pSphre; 00044 int valid; 00045 }; 00046 typedef struct sys_sem sys_sem_t; 00047 00048 #if 0 00049 struct sys_mbox 00050 { 00051 /*Queue<void>**/ void* pQueue; 00052 int valid; 00053 }; 00054 #else 00055 struct sys_mbox { 00056 volatile int first, last; 00057 void * volatile msgs[8]; 00058 struct sys_sem not_empty; 00059 struct sys_sem not_full; 00060 struct sys_sem mutex; 00061 volatile int wait_send; 00062 volatile int valid; 00063 }; 00064 #endif 00065 00066 00067 typedef struct sys_mbox sys_mbox_t; 00068 00069 typedef void/*struct sys_thread*/ sys_thread_t; 00070 00071 #define SYS_MBOX_NULL NULL 00072 #define SYS_SEM_NULL NULL 00073 00074 err_t sys_sem_new_mul(sys_sem_t *pSem, u8_t size, u8_t count); 00075 00076 #endif /* SYS_ARCH_H_ */
Generated on Tue Jul 12 2022 15:12:16 by 1.7.2