1ccebdf93SMatthias Ringwald /* 2ccebdf93SMatthias Ringwald * Copyright (C) 2014 BlueKitchen GmbH 3ccebdf93SMatthias Ringwald * 4ccebdf93SMatthias Ringwald * Redistribution and use in source and binary forms, with or without 5ccebdf93SMatthias Ringwald * modification, are permitted provided that the following conditions 6ccebdf93SMatthias Ringwald * are met: 7ccebdf93SMatthias Ringwald * 8ccebdf93SMatthias Ringwald * 1. Redistributions of source code must retain the above copyright 9ccebdf93SMatthias Ringwald * notice, this list of conditions and the following disclaimer. 10ccebdf93SMatthias Ringwald * 2. Redistributions in binary form must reproduce the above copyright 11ccebdf93SMatthias Ringwald * notice, this list of conditions and the following disclaimer in the 12ccebdf93SMatthias Ringwald * documentation and/or other materials provided with the distribution. 13ccebdf93SMatthias Ringwald * 3. Neither the name of the copyright holders nor the names of 14ccebdf93SMatthias Ringwald * contributors may be used to endorse or promote products derived 15ccebdf93SMatthias Ringwald * from this software without specific prior written permission. 16ccebdf93SMatthias Ringwald * 4. Any redistribution, use, or modification is done solely for 17ccebdf93SMatthias Ringwald * personal benefit and not for any commercial purpose or for 18ccebdf93SMatthias Ringwald * monetary gain. 19ccebdf93SMatthias Ringwald * 20ccebdf93SMatthias Ringwald * THIS SOFTWARE IS PROVIDED BY BLUEKITCHEN GMBH AND CONTRIBUTORS 21ccebdf93SMatthias Ringwald * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 22ccebdf93SMatthias Ringwald * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 23*2fca4dadSMilanka Ringwald * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BLUEKITCHEN 24*2fca4dadSMilanka Ringwald * GMBH OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 25ccebdf93SMatthias Ringwald * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 26ccebdf93SMatthias Ringwald * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS 27ccebdf93SMatthias Ringwald * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 28ccebdf93SMatthias Ringwald * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 29ccebdf93SMatthias Ringwald * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF 30ccebdf93SMatthias Ringwald * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31ccebdf93SMatthias Ringwald * SUCH DAMAGE. 32ccebdf93SMatthias Ringwald * 33ccebdf93SMatthias Ringwald * Please inquire about commercial licensing options at 34ccebdf93SMatthias Ringwald * [email protected] 35ccebdf93SMatthias Ringwald * 36ccebdf93SMatthias Ringwald */ 37ccebdf93SMatthias Ringwald 38ccebdf93SMatthias Ringwald /* 39ccebdf93SMatthias Ringwald * btstack_chipset_atwilc3000.c 40ccebdf93SMatthias Ringwald * 41ccebdf93SMatthias Ringwald * Adapter to use atwilc3000-based chipsets with BTstack 42ccebdf93SMatthias Ringwald * 43ccebdf93SMatthias Ringwald */ 44ccebdf93SMatthias Ringwald 4580e33422SMatthias Ringwald #ifndef BTSTACK_CHIPSET_ATWILC3000_H 4680e33422SMatthias Ringwald #define BTSTACK_CHIPSET_ATWILC3000_H 47ccebdf93SMatthias Ringwald 48ccebdf93SMatthias Ringwald #if defined __cplusplus 49ccebdf93SMatthias Ringwald extern "C" { 50ccebdf93SMatthias Ringwald #endif 51ccebdf93SMatthias Ringwald 52ccebdf93SMatthias Ringwald #include "btstack_chipset.h" 5378a48aa8SMatthias Ringwald #include "btstack_uart.h" 54ccebdf93SMatthias Ringwald #include "btstack_uart_block.h" 55ccebdf93SMatthias Ringwald 566e0d5aedSMatthias Ringwald #define HCI_DEFAULT_BAUDRATE 115200 576e0d5aedSMatthias Ringwald 58ccebdf93SMatthias Ringwald /** 59ccebdf93SMatthias Ringwald * @brief get chipset instance 60ccebdf93SMatthias Ringwald */ 61ccebdf93SMatthias Ringwald const btstack_chipset_t * btstack_chipset_atwilc3000_instance(void); 62ccebdf93SMatthias Ringwald 63ccebdf93SMatthias Ringwald /** 6478a48aa8SMatthias Ringwald * @brief Download firmware via btstack_uart_t implementation 65ccebdf93SMatthias Ringwald * @param uart_driver -- already initialized 66c7d3427cSMatthias Ringwald * @param baudrate for firmware update 67f14824f7SMatthias Ringwald * @param flowcontrol after firmwware update 68ccebdf93SMatthias Ringwald * @param done callback. 0 = Success 69ccebdf93SMatthias Ringwald */ 7078a48aa8SMatthias Ringwald void btstack_chipset_atwilc3000_download_firmware_with_uart(const btstack_uart_t * uart_driver, uint32_t baudrate, int flowcontrol, const uint8_t * fw, uint32_t fw_size, void (*done)(int result)); 7178a48aa8SMatthias Ringwald 7278a48aa8SMatthias Ringwald /** 7378a48aa8SMatthias Ringwald * @brief Download firmware via btstack_uart_block_t implementation 7478a48aa8SMatthias Ringwald * @param uart_driver -- already initialized 7578a48aa8SMatthias Ringwald * @param baudrate for firmware update 7678a48aa8SMatthias Ringwald * @param flowcontrol after firmwware update 7778a48aa8SMatthias Ringwald * @param done callback. 0 = Success 7878a48aa8SMatthias Ringwald * @deprecated please use btstack_chipset_atwilc3000_download_firmware_with_uart instead 7978a48aa8SMatthias Ringwald */ 80f14824f7SMatthias Ringwald void btstack_chipset_atwilc3000_download_firmware(const btstack_uart_block_t * uart_driver, uint32_t baudrate, int flowcontrol, const uint8_t * fw, uint32_t fw_size, void (*done)(int result)); 81ccebdf93SMatthias Ringwald 82ccebdf93SMatthias Ringwald #if defined __cplusplus 83ccebdf93SMatthias Ringwald } 84ccebdf93SMatthias Ringwald #endif 85ccebdf93SMatthias Ringwald 8680e33422SMatthias Ringwald #endif // BTSTACK_CHIPSET_ATWILC3000_H 87