• 大小: 2.97MB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2023-09-09
  • 语言: 其他
  • 标签: Da14580  SDK5  

资源简介

Da14580官方开发包SDK5.0.3

资源截图

代码片段和文件信息

/**
****************************************************************************************
*
* @file app.c
*
* @brief Proximity Reporter Host demo application.
*
* Copyright (C) 2014. Dialog Semiconductor Ltd unpublished work. This computer 
* program includes Confidential Proprietary Information and is a Trade Secret of 
* Dialog Semiconductor Ltd.  All use disclosure and/or reproduction is prohibited 
* unless authorized in writing. All Rights Reserved.
*
 and contributors.
*
****************************************************************************************
*/
#include 
#include “global_io.h“
#include “peripherals.h“
#include “queue.h“
#include “gpio.h“
#include “app_button_led.h“
#include “ble_msg.h“
#include “gap_task.h“
#include “app.h“
#include “spi_booter.h“
#include “proxm.h“
#include “proxm_task.h“
#include “smpc_task.h“
#include “proxr.h“
#include “proxr_task.h“
#include “atts.h“
#include “spi.h“
#include “spi_hci_msg.h“
#include “uart.h“
#include “user_periph_setup.h“


struct app_env_tag app_env;

uint8_t rd_data[256];

int poll_count;
unsigned int proxm_trans_in_prog = true;

SPI_Pad_t spi_hci_pad;

/**
 ****************************************************************************************
 * @brief Application‘s main function.
 *
 * @return the program‘s exit code.
 ****************************************************************************************
 */
int main (void)
{
    spi_hci_pad.pin = SPI_CS_PIN;
    spi_hci_pad.port = SPI_GPIO_PORT;
    
    // peripherals init
    periph_init();
    
    // App Initialization
    app_env.slave_on_sleep = SLAVE_UNAVAILABLE;
    app_env.size_tx_queue = 0;
    app_env.size_rx_queue = 0;
    
#ifdef SPI_BOOTER
    spi_send_image();
#endif
    
    spi_init(&spi_hci_pad SPI_WORD_MODE SPI_ROLE SPI_POL_MODE SPI_PHA_MODE SPI_MINT_MODE SPI_FREQ_MODE);
    dready_irq_enable();
    app_button_enable();
    
    while(1)
    {
        if (app_env.slave_on_sleep == SLAVE_AVAILABLE)
        {
            if (app_env.size_tx_queue > 0)
            {
                ble_msg *blemsg = (ble_msg *) DeQueue(&SPITxQueue);
                spi_send_hci_msg(blemsg->bLength + sizeof(ble_hdr) (uint8_t *) blemsg);
                free(blemsg);
                app_env.size_tx_queue--;
            }
        }
        
        if (app_env.size_rx_queue > 0)
        {
            BleReceiveMsg();
            app_env.size_rx_queue--;
        }
    }
}

/**
 ****************************************************************************************
 * @brief Send Reset request to GAP task.
 *
 * @return void.
 ****************************************************************************************
 */

void app_rst_gap(void)
{
struct gapm_reset_cmd *msg = BleMsgAlloc(GAPM_RESET_CMD /*GAP_RESET_REQ*/ TASK_GAPM TASK_APP
                               

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2015-10-15 12:20  DA1458x_SDK\5.0.3\
     目录           0  2015-10-15 12:20  DA1458x_SDK\5.0.3\binaries\
     目录           0  2015-10-15 12:20  DA1458x_SDK\5.0.3\binaries\da1458x\
     目录           0  2015-10-15 12:25  DA1458x_SDK\5.0.3\binaries\da1458x\prod_test\
     文件       67203  2015-10-15 12:24  DA1458x_SDK\5.0.3\binaries\da1458x\prod_test\prod_test_580.hex
     文件       59966  2015-10-15 12:24  DA1458x_SDK\5.0.3\binaries\da1458x\prod_test\prod_test_581.hex
     文件       67203  2015-10-15 12:25  DA1458x_SDK\5.0.3\binaries\da1458x\prod_test\prod_test_583.hex
     目录           0  2015-10-15 12:20  DA1458x_SDK\5.0.3\binaries\host\
     目录           0  2015-10-15 12:20  DA1458x_SDK\5.0.3\binaries\host\windows\
     目录           0  2015-10-15 12:25  DA1458x_SDK\5.0.3\binaries\host\windows\mkimage\
     文件       19456  2015-10-15 12:25  DA1458x_SDK\5.0.3\binaries\host\windows\mkimage\mkimage.exe
     目录           0  2015-10-15 12:25  DA1458x_SDK\5.0.3\binaries\host\windows\prod_test_cmds\
     文件       27136  2015-10-15 12:25  DA1458x_SDK\5.0.3\binaries\host\windows\prod_test_cmds\prodtest.exe
     目录           0  2015-10-15 12:20  DA1458x_SDK\5.0.3\binaries\host\windows\proximity\
     目录           0  2015-10-15 12:25  DA1458x_SDK\5.0.3\binaries\host\windows\proximity\monitor\
     文件       26624  2015-10-15 12:25  DA1458x_SDK\5.0.3\binaries\host\windows\proximity\monitor\host_proxm_sdk.exe
     文件       26624  2015-10-15 12:25  DA1458x_SDK\5.0.3\binaries\host\windows\proximity\monitor\host_proxm_sdk_581.exe
     目录           0  2015-10-15 12:25  DA1458x_SDK\5.0.3\binaries\host\windows\proximity\reporter\
     文件       23552  2015-10-15 12:25  DA1458x_SDK\5.0.3\binaries\host\windows\proximity\reporter\host_proxr_sdk.exe
     文件       23552  2015-10-15 12:25  DA1458x_SDK\5.0.3\binaries\host\windows\proximity\reporter\host_proxr_sdk_581.exe
     目录           0  2015-10-15 12:20  DA1458x_SDK\5.0.3\binaries\host\windows\spota\
     目录           0  2015-10-15 12:25  DA1458x_SDK\5.0.3\binaries\host\windows\spota\initiator\
     文件       22528  2015-10-15 12:25  DA1458x_SDK\5.0.3\binaries\host\windows\spota\initiator\host_spotai.exe
     文件       22528  2015-10-15 12:25  DA1458x_SDK\5.0.3\binaries\host\windows\spota\initiator\host_spotai_581.exe
     目录           0  2015-10-15 12:20  DA1458x_SDK\5.0.3\binaries\host\windows\suota\
     目录           0  2015-10-15 12:25  DA1458x_SDK\5.0.3\binaries\host\windows\suota\initiator\
     文件       23552  2015-10-15 12:25  DA1458x_SDK\5.0.3\binaries\host\windows\suota\initiator\host_suotai.exe
     文件       23552  2015-10-15 12:25  DA1458x_SDK\5.0.3\binaries\host\windows\suota\initiator\host_suotai_581.exe
     文件        6293  2015-10-15 12:12  DA1458x_SDK\5.0.3\license.txt
     目录           0  2015-10-15 12:20  DA1458x_SDK\5.0.3\projects\
     目录           0  2015-10-15 12:20  DA1458x_SDK\5.0.3\projects\host_apps\
............此处省略1386个文件信息

评论

共有 条评论