SDK สำหรับ TESAIoT Dev Kit
คู่มืออ้างอิง API และ Tutorial (MTB & µPython)
Loading...
Searching...
No Matches
cy_wcm_shim.h
Go to the documentation of this file.
1/*******************************************************************************
2 * cy_wcm_shim.h — Minimal WCM type stubs for CM55 IPC service compilation.
3 *
4 * WiFi runs on CM33_NS only (SDHC0 PPC-protected). CM55 wifi_manager is a
5 * stub returning errors. This header provides the types and constants that
6 * ipc_service.c references so it compiles without the full WiFi stack.
7 *******************************************************************************/
8
9#ifndef CY_WCM_SHIM_H
10#define CY_WCM_SHIM_H
11
12#include <stdint.h>
13#include "cy_result.h"
14
15/* Scan status */
16typedef uint32_t cy_wcm_scan_status_t;
17#define CY_WCM_SCAN_INCOMPLETE 0
18#define CY_WCM_SCAN_COMPLETE 1
19
20/* Security types */
21#define CY_WCM_SECURITY_OPEN 0
22#define CY_WCM_SECURITY_WEP_SHARED 2
23#define CY_WCM_SECURITY_WPA_MIXED_PSK 4
24#define CY_WCM_SECURITY_WPA2_AES_PSK 6
25#define CY_WCM_SECURITY_WPA2_FBT_PSK 8
26
27/* Scan result */
28typedef struct {
29 char SSID[33];
31 uint8_t security;
32 uint8_t channel;
34
35/* Scan filter */
36#define CY_WCM_SCAN_FILTER_TYPE_RSSI 1
37
38typedef struct {
39 uint8_t mode;
40 union {
41 int16_t rssi_range;
42 } param;
44
45/* Scan callback type */
47
48/* Stub functions — WiFi not available on CM55 */
49static inline cy_rslt_t cy_wcm_start_scan(cy_wcm_scan_cb_t cb, void *ud, cy_wcm_scan_filter_t *f)
50{
51 (void)cb; (void)ud; (void)f;
52 return 1; /* fail — WiFi not on CM55 */
53}
54
55static inline cy_rslt_t cy_wcm_stop_scan(void)
56{
57 return 0;
58}
59
60#endif /* CY_WCM_SHIM_H */
uint32_t cy_wcm_scan_status_t
Definition cy_wcm_shim.h:16
void(*) cy_wcm_scan_cb_t(cy_wcm_scan_result_t *, void *, cy_wcm_scan_status_t)
Definition cy_wcm_shim.h:46
Definition cy_wcm_shim.h:38
uint8_t mode
Definition cy_wcm_shim.h:39
Definition cy_wcm_shim.h:28
uint8_t security
Definition cy_wcm_shim.h:31
uint8_t channel
Definition cy_wcm_shim.h:32
char SSID[33]
Definition cy_wcm_shim.h:29
int16_t signal_strength
Definition cy_wcm_shim.h:30