Skip to content

Commit

Permalink
Merge pull request #125 from ingchips/develop
Browse files Browse the repository at this point in the history
release 8.2.3
  • Loading branch information
zjli-2019 authored Jan 19, 2023
2 parents 07ffc14 + 42aab7f commit 097adcb
Show file tree
Hide file tree
Showing 463 changed files with 21,344 additions and 21,073 deletions.
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,21 @@ but also GUI tools and documentation.
1. Run `make`;
1. Use [Flash Downloader](tools/README.md) to download programs.

### The Mixed Way

1. [Download](releases) setup file & install our SDK package;
1. Fork/Clone this repository;
1. Run [gen_files](tools/README.md) to prepare files;
1. Edit _/path/to/sdk/wizard/cfg/settings.json_ while _Wizard_ is closed:
change _sdk_ to the path of the cloned repository:

```json
{
"sdk": "path/to/cloned/repository",
}
```
1. Start _Wizard_.

## Branches

1. `master` is used for releases;
Expand Down
675 changes: 336 additions & 339 deletions bundles/exp/ING9187xx/apis.json

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions bundles/exp/ING9187xx/meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
},
"ram": {
"base": 536870912,
"size": 31092
"size": 30084
},
"rom": {
"base": 16384,
"size": 143512
"size": 143216
},
"version": [
1,
8,
3
5
]
}
Binary file modified bundles/exp/ING9187xx/platform.bin
Binary file not shown.
713 changes: 355 additions & 358 deletions bundles/exp/ING9188xx/apis.json

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions bundles/exp/ING9188xx/meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
},
"ram": {
"base": 536870912,
"size": 31092
"size": 30084
},
"rom": {
"base": 16384,
"size": 150488
"size": 150192
},
"version": [
1,
8,
3
5
]
}
Binary file modified bundles/exp/ING9188xx/platform.bin
Binary file not shown.
6 changes: 3 additions & 3 deletions bundles/exp/inc/att_db.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* @brief API for ATT server
*
* INGCHIPS confidential and proprietary.
* COPYRIGHT (c) 2018 by INGCHIPS
* COPYRIGHT (c) 2018-2023 by INGCHIPS
*
* All rights are reserved. Reproduction in whole or in part is
* prohibited without the written consent of the copyright owner.
Expand All @@ -28,10 +28,10 @@ extern "C" {
* @ingroup bluetooth_host
* @{
*/
// custom BTstack error codes
// custom btstack error codes
#define ATT_ERROR_HCI_DISCONNECT_RECEIVED 0x1f

// custom BTstack ATT error coders
// custom btstack ATT error coders
#define ATT_ERROR_DATA_MISMATCH 0x7e
#define ATT_ERROR_TIMEOUT 0x7F

Expand Down
2 changes: 1 addition & 1 deletion bundles/exp/inc/att_dispatch.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// ----------------------------------------------------------------------------
//
// INGCHIPS confidential and proprietary.
// COPYRIGHT (c) 2018 by INGCHIPS
// COPYRIGHT (c) 2018-2023 by INGCHIPS
//
// All rights are reserved. Reproduction in whole or in part is
// prohibited without the written consent of the copyright owner.
Expand Down
43 changes: 29 additions & 14 deletions bundles/exp/inc/btstack_defines.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// ----------------------------------------------------------------------------
//
// INGCHIPS confidential and proprietary.
// COPYRIGHT (c) 2018 by INGCHIPS
// COPYRIGHT (c) 2018-2023 by INGCHIPS
//
// All rights are reserved. Reproduction in whole or in part is
// prohibited without the written consent of the copyright owner.
Expand Down Expand Up @@ -53,10 +53,15 @@

#define L2CAP_SERVICE_ALREADY_REGISTERED 0x69
#define L2CAP_DATA_LEN_EXCEEDS_REMOTE_MTU 0x6A
#define L2CAP_SERVICE_NOT_REGISTERED 0x6B
#define L2CAP_CONNECTION_INSUFFICIENT_SECURITY 0x6C

#define ATT_HANDLE_VALUE_INDICATION_IN_PORGRESS 0x90
#define ATT_HANDLE_VALUE_INDICATION_IN_PROGRESS 0x90
#define ATT_HANDLE_VALUE_INDICATION_TIMEOUT 0x91

// compatibility for typo
#define ATT_HANDLE_VALUE_INDICATION_IN_PORGRESS ATT_HANDLE_VALUE_INDICATION_IN_PROGRESS

#define GATT_CLIENT_NOT_CONNECTED 0x93
#define GATT_CLIENT_BUSY 0x94
#define GATT_CLIENT_IN_WRONG_STATE 0x95
Expand Down Expand Up @@ -88,22 +93,14 @@
// L2CAP EVENTS

/**
* @format 1BH222222
* @param status
* @param address
* @param handle
* @param psm
* @param local_cid
* @param remote_cid
* @param local_mtu
* @param remote_mtu
* @param flush_timeout
* @brief an L2CAP channel is opened
* @ref `l2cap_event_channel_opened_t`
*/
#define L2CAP_EVENT_CHANNEL_OPENED 0x70

/*
* @format 2
* @param local_cid
* @brief an L2CAP channel is closed
* @ref `l2cap_event_channel_closed_t`
*/
#define L2CAP_EVENT_CHANNEL_CLOSED 0x71

Expand Down Expand Up @@ -153,6 +150,24 @@
*/
#define L2CAP_EVENT_COMMAND_REJECT_RESPONSE 0x79

/**
* @brief LE credit channel : an SDU (complete package) event
*
* Use `decode_l2cap_event(l2cap_event_complete_sdu_t, package)` to decode this event.
*
* @ref `l2cap_event_complete_sdu_t`
*/
#define L2CAP_EVENT_COMPLETED_SDU_PACKET 0x7A

/**
* @brief LE credit channel : a fragment (K-frame) of an SDU event
*
* Use `decode_l2cap_event(l2cap_event_fragment_sdu_t, package)` to decode this event.
*
* @ref `l2cap_event_fragment_sdu_t`
*/
#define L2CAP_EVENT_FRAGMENT_SDU_PACKET 0x7B

/**
* @format H1
* @param handle
Expand Down
43 changes: 41 additions & 2 deletions bundles/exp/inc/btstack_event.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*
*
* INGCHIPS confidential and proprietary.
* COPYRIGHT (c) 2018 by INGCHIPS
* COPYRIGHT (c) 2018-2023 by INGCHIPS
*
* All rights are reserved. Reproduction in whole or in part is
* prohibited without the written consent of the copyright owner.
Expand Down Expand Up @@ -783,6 +783,43 @@ static __INLINE uint8_t gap_event_dedicated_bonding_completed_get_status(const u
return *decode_event_offset(event, uint8_t, 2);
}

typedef struct l2cap_event_complete_sdu
{
uint16_t total_length; // total length of this SDU
const uint8_t *payload; // payload of this SDU
} l2cap_event_complete_sdu_t;

typedef struct l2cap_event_channel_opened
{
uint8_t status;
bd_addr_t peer_addr;
hci_con_handle_t conn_handle;
uint16_t psm;
uint16_t local_cid;
uint16_t peer_cid;
uint16_t local_mtu;
uint16_t peer_mtu;
uint16_t local_mps;
uint16_t peer_mps;
uint16_t flush_timeout;
uint16_t local_credits;
uint16_t peer_credits;
} l2cap_event_channel_opened_t;

typedef struct l2cap_event_channel_closed
{
uint16_t local_cid;
uint8_t reason;
} l2cap_event_channel_closed_t;

typedef struct l2cap_event_fragment_sdu
{
uint16_t total_length; // total length of this SDU
uint16_t offset; // offset of this fragment within a SDU
uint16_t length; // length of this fragment within a SDU
const uint8_t *payload; // payload of this fragment
} l2cap_event_fragment_sdu_t;

typedef struct event_command_complete_return_param_read_rssi
{
uint8_t status;
Expand Down Expand Up @@ -1226,7 +1263,9 @@ typedef enum btstack_l2cap_msg_def
#define decode_hci_event_disconn_complete(packet) decode_event_offset(packet, event_disconn_complete_t, 2)
#define decode_hci_event_vendor_ccm_complete(packet) decode_event_offset(packet, event_vendor_ccm_complete_t, 5)

#define decode_hci_event(packet, T) decode_event_offset(packet, T, 2)
#define decode_hci_event(packet, T) decode_event_offset(packet, T, 2)

#define decode_l2cap_event(packet, T) decode_event_offset(packet, T, 2)

/* API_END */

Expand Down
2 changes: 1 addition & 1 deletion bundles/exp/inc/btstack_util.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// ----------------------------------------------------------------------------
//
// INGCHIPS confidential and proprietary.
// COPYRIGHT (c) 2018 by INGCHIPS
// COPYRIGHT (c) 2018-2023 by INGCHIPS
//
// All rights are reserved. Reproduction in whole or in part is
// prohibited without the written consent of the copyright owner.
Expand Down
2 changes: 1 addition & 1 deletion bundles/exp/inc/gap.h
Original file line number Diff line number Diff line change
Expand Up @@ -1366,7 +1366,7 @@ void hci_add_event_handler(btstack_packet_callback_registration_t * callback_han
void hci_register_acl_packet_handler(btstack_packet_handler_t handler);

/**
* @brief Requests the change of BTstack power mode.
* @brief Requests the change of btstack power mode.
*
* @param mode 0:HCI_POWER_OFF ,1:HCI_POWER_ON , 2:HCI_POWER_SLEEP
*
Expand Down
2 changes: 1 addition & 1 deletion bundles/exp/inc/gatt_client.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Copyright Message
*
* INGCHIPS confidential and proprietary.
* COPYRIGHT (c) 2018 by INGCHIPS
* COPYRIGHT (c) 2018-2023 by INGCHIPS
*
* All rights are reserved. Reproduction in whole or in part is
* prohibited without the written consent of the copyright owner.
Expand Down
Loading

0 comments on commit 097adcb

Please sign in to comment.