13d0407baSopenharmony_ci/*
23d0407baSopenharmony_ci * Copyright (c) 2022 FuZhou Lockzhiner Electronic Co., Ltd. All rights reserved.
33d0407baSopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License");
43d0407baSopenharmony_ci * you may not use this file except in compliance with the License.
53d0407baSopenharmony_ci * You may obtain a copy of the License at
63d0407baSopenharmony_ci *
73d0407baSopenharmony_ci *     http://www.apache.org/licenses/LICENSE-2.0
83d0407baSopenharmony_ci *
93d0407baSopenharmony_ci * Unless required by applicable law or agreed to in writing, software
103d0407baSopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS,
113d0407baSopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
123d0407baSopenharmony_ci * See the License for the specific language governing permissions and
133d0407baSopenharmony_ci * limitations under the License.
143d0407baSopenharmony_ci */
153d0407baSopenharmony_ci
163d0407baSopenharmony_ci/**
173d0407baSopenharmony_ci * @addtogroup Lockzhiner
183d0407baSopenharmony_ci *
193d0407baSopenharmony_ci * @file vendor.h
203d0407baSopenharmony_ci */
213d0407baSopenharmony_ci
223d0407baSopenharmony_ci#ifndef LZ_HARDWARE_VENDOR_H
233d0407baSopenharmony_ci#define LZ_HARDWARE_VENDOR_H
243d0407baSopenharmony_ci
253d0407baSopenharmony_ci#define RK2206_SOFT_AP_SSID      "softap"
263d0407baSopenharmony_ci#define RK2206_SOFT_AP_PASSWORD  "12345678"
273d0407baSopenharmony_ci#define RK2206_SOAT_AP_NFC_MSG   "RK2206_AP_SETTING\r\n" RK2206_SOFT_AP_SSID "\r\n" RK2206_SOFT_AP_PASSWORD
283d0407baSopenharmony_ci
293d0407baSopenharmony_ci#define VENDOR_ID_SIZE           64
303d0407baSopenharmony_ci
313d0407baSopenharmony_citypedef enum {
323d0407baSopenharmony_ci    /* 13Bytes Manufacture ID */
333d0407baSopenharmony_ci    VENDOR_ID_SN = 0,
343d0407baSopenharmony_ci    /* 6Bytes Mac Address */
353d0407baSopenharmony_ci    VENDOR_ID_MAC,
363d0407baSopenharmony_ci    /* Product ID */
373d0407baSopenharmony_ci    VENDOR_ID_PRODUCT,
383d0407baSopenharmony_ci    /* Factory Test flags */
393d0407baSopenharmony_ci    VENDOR_ID_FACTORY,
403d0407baSopenharmony_ci    /* Wifi hotspot mode: IP address */
413d0407baSopenharmony_ci    VENDOR_ID_NET_IP,
423d0407baSopenharmony_ci    /* Wifi hotspot mode: gateway */
433d0407baSopenharmony_ci    VENDOR_ID_NET_GW,
443d0407baSopenharmony_ci    /* Wifi hotspot mode: netmask */
453d0407baSopenharmony_ci    VENDOR_ID_NET_MASK,
463d0407baSopenharmony_ci    /* Wifi device mode: ssid */
473d0407baSopenharmony_ci    VENDOR_ID_WIFI_SSID,
483d0407baSopenharmony_ci    /* Wifi device mode: password */
493d0407baSopenharmony_ci    VENDOR_ID_WIFI_PASSWD,
503d0407baSopenharmony_ci
513d0407baSopenharmony_ci    /* Custom definition ID */
523d0407baSopenharmony_ci    VENDOR_ID_CUSTOM = 32,
533d0407baSopenharmony_ci    VENDOR_ID_MAX = 64,  // Each ID has 64Bytes storage space, Total is 4096Btyes(4K)
543d0407baSopenharmony_ci} VendorID;
553d0407baSopenharmony_ci
563d0407baSopenharmony_ci/**
573d0407baSopenharmony_ci * @brief Get vendor information.
583d0407baSopenharmony_ci *
593d0407baSopenharmony_ci * This function get vendor information by ID.
603d0407baSopenharmony_ci *
613d0407baSopenharmony_ci * @param id Indicates the vendor ID.
623d0407baSopenharmony_ci * @param buf Indicates the buffer to save vendor information.
633d0407baSopenharmony_ci * @param len Indicates the length of vendor information to get, it should be less than 64.
643d0407baSopenharmony_ci * @return Returns {@link LZ_HARDWARE_SUCCESS} if the vendor information is got successfully;
653d0407baSopenharmony_ci * returns {@link LZ_HARDWARE_FAILURE} otherwise. For details about other return values, see the chip description.
663d0407baSopenharmony_ci */
673d0407baSopenharmony_ciunsigned int VendorGet(VendorID id, unsigned char *buf, int len);
683d0407baSopenharmony_ci
693d0407baSopenharmony_ci/**
703d0407baSopenharmony_ci * @brief Set vendor information.
713d0407baSopenharmony_ci *
723d0407baSopenharmony_ci * This function set vendor information by ID.
733d0407baSopenharmony_ci *
743d0407baSopenharmony_ci * @param id Indicates the vendor ID.
753d0407baSopenharmony_ci * @param buf Indicates the buffer to save vendor information.
763d0407baSopenharmony_ci * @param len Indicates the length of vendor information to set, it should be less than 64.
773d0407baSopenharmony_ci * @return Returns {@link LZ_HARDWARE_SUCCESS} if the vendor information is set successfully;
783d0407baSopenharmony_ci * returns {@link LZ_HARDWARE_FAILURE} otherwise. For details about other return values, see the chip description.
793d0407baSopenharmony_ci */
803d0407baSopenharmony_ciunsigned int VendorSet(VendorID id, unsigned char *buf, int len);
813d0407baSopenharmony_ci
823d0407baSopenharmony_ci#endif
833d0407baSopenharmony_ci
84