Initial commit
mbed-dev-master/targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F439xI/TARGET_MODULE_UBLOX_ODIN_W2/sdk/ublox-odin-w2-drivers/cb_wlan_target_data.h@0:bb348c97df44, 2020-09-16 (annotated)
- Committer:
- lypinator
- Date:
- Wed Sep 16 01:11:49 2020 +0000
- Revision:
- 0:bb348c97df44
Added PWM
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
lypinator | 0:bb348c97df44 | 1 | /*--------------------------------------------------------------------------- |
lypinator | 0:bb348c97df44 | 2 | * Copyright (c) 2016, u-blox Malmö, All Rights Reserved |
lypinator | 0:bb348c97df44 | 3 | * SPDX-License-Identifier: LicenseRef-PBL |
lypinator | 0:bb348c97df44 | 4 | * |
lypinator | 0:bb348c97df44 | 5 | * This file and the related binary are licensed under the |
lypinator | 0:bb348c97df44 | 6 | * Permissive Binary License, Version 1.0 (the "License"); |
lypinator | 0:bb348c97df44 | 7 | * you may not use these files except in compliance with the License. |
lypinator | 0:bb348c97df44 | 8 | * |
lypinator | 0:bb348c97df44 | 9 | * You may obtain a copy of the License here: |
lypinator | 0:bb348c97df44 | 10 | * LICENSE-permissive-binary-license-1.0.txt and at |
lypinator | 0:bb348c97df44 | 11 | * https://www.mbed.com/licenses/PBL-1.0 |
lypinator | 0:bb348c97df44 | 12 | * |
lypinator | 0:bb348c97df44 | 13 | * See the License for the specific language governing permissions and |
lypinator | 0:bb348c97df44 | 14 | * limitations under the License. |
lypinator | 0:bb348c97df44 | 15 | * |
lypinator | 0:bb348c97df44 | 16 | * Component : Wireless LAN driver |
lypinator | 0:bb348c97df44 | 17 | * File : cb_wlan_target_data.h |
lypinator | 0:bb348c97df44 | 18 | * |
lypinator | 0:bb348c97df44 | 19 | * Description : Port specific data buffer handling (ethernet frames) |
lypinator | 0:bb348c97df44 | 20 | *-------------------------------------------------------------------------*/ |
lypinator | 0:bb348c97df44 | 21 | |
lypinator | 0:bb348c97df44 | 22 | /** |
lypinator | 0:bb348c97df44 | 23 | * @file cb_wlan_target_data.h Handles the anonymous port specific packetization |
lypinator | 0:bb348c97df44 | 24 | * of ethernet frames. |
lypinator | 0:bb348c97df44 | 25 | * @ingroup target |
lypinator | 0:bb348c97df44 | 26 | */ |
lypinator | 0:bb348c97df44 | 27 | |
lypinator | 0:bb348c97df44 | 28 | #ifndef _CB_WLANTARGET_DATA_H_ |
lypinator | 0:bb348c97df44 | 29 | #define _CB_WLANTARGET_DATA_H_ |
lypinator | 0:bb348c97df44 | 30 | |
lypinator | 0:bb348c97df44 | 31 | #include "cb_types.h" |
lypinator | 0:bb348c97df44 | 32 | |
lypinator | 0:bb348c97df44 | 33 | #ifdef __cplusplus |
lypinator | 0:bb348c97df44 | 34 | extern "C" { |
lypinator | 0:bb348c97df44 | 35 | #endif |
lypinator | 0:bb348c97df44 | 36 | |
lypinator | 0:bb348c97df44 | 37 | /*=========================================================================== |
lypinator | 0:bb348c97df44 | 38 | * DEFINES |
lypinator | 0:bb348c97df44 | 39 | *=========================================================================*/ |
lypinator | 0:bb348c97df44 | 40 | |
lypinator | 0:bb348c97df44 | 41 | /*=========================================================================== |
lypinator | 0:bb348c97df44 | 42 | * TYPES |
lypinator | 0:bb348c97df44 | 43 | *=========================================================================*/ |
lypinator | 0:bb348c97df44 | 44 | |
lypinator | 0:bb348c97df44 | 45 | typedef struct cbWLANTARGET_dataFrame cbWLANTARGET_dataFrame; |
lypinator | 0:bb348c97df44 | 46 | typedef struct cbWLANTARGET_Handle cbWLANTARGET_Handle; |
lypinator | 0:bb348c97df44 | 47 | |
lypinator | 0:bb348c97df44 | 48 | |
lypinator | 0:bb348c97df44 | 49 | /** |
lypinator | 0:bb348c97df44 | 50 | * Copy data from frame data memory to buffer. |
lypinator | 0:bb348c97df44 | 51 | * |
lypinator | 0:bb348c97df44 | 52 | * @param buffer The destination buffer. |
lypinator | 0:bb348c97df44 | 53 | * @param frame Frame memory pointer (@ref cbWLANTARGET_allocDataFrame). |
lypinator | 0:bb348c97df44 | 54 | * @param size Number of bytes to copy. |
lypinator | 0:bb348c97df44 | 55 | * @param offsetInFrame Offset into frame memory. |
lypinator | 0:bb348c97df44 | 56 | * @return @ref TRUE if successful, otherwise @ref FALSE. |
lypinator | 0:bb348c97df44 | 57 | */ |
lypinator | 0:bb348c97df44 | 58 | typedef cb_boolean(*cbWLANTARGET_copyFromDataFrame)(cb_uint8* buffer, cbWLANTARGET_dataFrame* frame, cb_uint32 size, cb_uint32 offsetInFrame); |
lypinator | 0:bb348c97df44 | 59 | |
lypinator | 0:bb348c97df44 | 60 | /** |
lypinator | 0:bb348c97df44 | 61 | * Copy data from buffer to frame data memory. |
lypinator | 0:bb348c97df44 | 62 | * |
lypinator | 0:bb348c97df44 | 63 | * @param frame Frame memory pointer (@ref cbWLANTARGET_allocDataFrame). |
lypinator | 0:bb348c97df44 | 64 | * @param buffer The destination buffer. |
lypinator | 0:bb348c97df44 | 65 | * @param size Number of bytes to copy. |
lypinator | 0:bb348c97df44 | 66 | * @param offsetInFrame Offset into frame memory. |
lypinator | 0:bb348c97df44 | 67 | * @return @ref TRUE if successful, otherwise @ref FALSE. |
lypinator | 0:bb348c97df44 | 68 | */ |
lypinator | 0:bb348c97df44 | 69 | typedef cb_boolean(*cbWLANTARGET_copyToDataFrame)(cbWLANTARGET_dataFrame* frame, cb_uint8* buffer, cb_uint32 size, cb_uint32 offsetInFrame); |
lypinator | 0:bb348c97df44 | 70 | |
lypinator | 0:bb348c97df44 | 71 | /** |
lypinator | 0:bb348c97df44 | 72 | * Allocate memory in frame data memory. |
lypinator | 0:bb348c97df44 | 73 | * |
lypinator | 0:bb348c97df44 | 74 | * @param size Number of bytes to allocate. |
lypinator | 0:bb348c97df44 | 75 | * @return Pointer to the frame memory. |
lypinator | 0:bb348c97df44 | 76 | * |
lypinator | 0:bb348c97df44 | 77 | * @ref cbWLANTARGET_freeDataFrame |
lypinator | 0:bb348c97df44 | 78 | */ |
lypinator | 0:bb348c97df44 | 79 | typedef cbWLANTARGET_dataFrame*(*cbWLANTARGET_allocDataFrame)(cb_uint32 size); |
lypinator | 0:bb348c97df44 | 80 | |
lypinator | 0:bb348c97df44 | 81 | /** |
lypinator | 0:bb348c97df44 | 82 | * Destroy memory in frame data memory. |
lypinator | 0:bb348c97df44 | 83 | * |
lypinator | 0:bb348c97df44 | 84 | * @param frame Pointer to the frame memory that should be destroyed. |
lypinator | 0:bb348c97df44 | 85 | * @ref cbWLANTARGET_allocDataFrame |
lypinator | 0:bb348c97df44 | 86 | */ |
lypinator | 0:bb348c97df44 | 87 | typedef void(*cbWLANTARGET_freeDataFrame)(cbWLANTARGET_dataFrame* frame); |
lypinator | 0:bb348c97df44 | 88 | |
lypinator | 0:bb348c97df44 | 89 | typedef cb_uint32(*cbWLANTARGET_getDataFrameSize)(cbWLANTARGET_dataFrame* frame); |
lypinator | 0:bb348c97df44 | 90 | |
lypinator | 0:bb348c97df44 | 91 | typedef cb_uint8(*cbWLANTARGET_getDataFrameTID)(cbWLANTARGET_dataFrame* frame); |
lypinator | 0:bb348c97df44 | 92 | |
lypinator | 0:bb348c97df44 | 93 | typedef struct |
lypinator | 0:bb348c97df44 | 94 | { |
lypinator | 0:bb348c97df44 | 95 | cbWLANTARGET_copyFromDataFrame copyFromDataFrameIndication; |
lypinator | 0:bb348c97df44 | 96 | cbWLANTARGET_copyToDataFrame copyToDataFrameIndication; |
lypinator | 0:bb348c97df44 | 97 | cbWLANTARGET_allocDataFrame allocDataFrameIndication; |
lypinator | 0:bb348c97df44 | 98 | cbWLANTARGET_freeDataFrame freeDataFrameIndication; |
lypinator | 0:bb348c97df44 | 99 | cbWLANTARGET_getDataFrameSize getDataFrameSizeIndication; |
lypinator | 0:bb348c97df44 | 100 | cbWLANTARGET_getDataFrameTID getDataFrameTIDIndication; |
lypinator | 0:bb348c97df44 | 101 | }cbWLANTARGET_Callback; |
lypinator | 0:bb348c97df44 | 102 | |
lypinator | 0:bb348c97df44 | 103 | /*=========================================================================== |
lypinator | 0:bb348c97df44 | 104 | * FUNCTIONS |
lypinator | 0:bb348c97df44 | 105 | *=========================================================================*/ |
lypinator | 0:bb348c97df44 | 106 | |
lypinator | 0:bb348c97df44 | 107 | /** |
lypinator | 0:bb348c97df44 | 108 | * Register WLAN target callbacks. This should be done for packetization between |
lypinator | 0:bb348c97df44 | 109 | * the WLAN driver and an IP stack. |
lypinator | 0:bb348c97df44 | 110 | * |
lypinator | 0:bb348c97df44 | 111 | * @param callbacks Callbacks |
lypinator | 0:bb348c97df44 | 112 | */ |
lypinator | 0:bb348c97df44 | 113 | void cbWLANTARGET_registerCallbacks(cbWLANTARGET_Callback* callbacks); |
lypinator | 0:bb348c97df44 | 114 | |
lypinator | 0:bb348c97df44 | 115 | #ifdef __cplusplus |
lypinator | 0:bb348c97df44 | 116 | } |
lypinator | 0:bb348c97df44 | 117 | #endif |
lypinator | 0:bb348c97df44 | 118 | |
lypinator | 0:bb348c97df44 | 119 | #endif |