commit
8f9cd7075e
4
.github/workflows/build.yml
vendored
4
.github/workflows/build.yml
vendored
@ -343,8 +343,8 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
sudo apt-get install -y gettext
|
sudo apt-get install -y gettext
|
||||||
pip install requests sh click setuptools awscli
|
pip install requests sh click setuptools awscli
|
||||||
wget https://adafruit-circuit-python.s3.amazonaws.com/gcc-arm-none-eabi-9-2019-q4-major-x86_64-linux.tar.bz2
|
wget --no-verbose https://adafruit-circuit-python.s3.amazonaws.com/gcc-arm-none-eabi-10-2020-q4-major-x86_64-linux.tar.bz2
|
||||||
sudo tar -C /usr --strip-components=1 -xaf gcc-arm-none-eabi-9-2019-q4-major-x86_64-linux.tar.bz2
|
sudo tar -C /usr --strip-components=1 -xaf gcc-arm-none-eabi-10-2020-q4-major-x86_64-linux.tar.bz2
|
||||||
- name: Versions
|
- name: Versions
|
||||||
run: |
|
run: |
|
||||||
gcc --version
|
gcc --version
|
||||||
|
@ -61,7 +61,7 @@ STATIC struct {
|
|||||||
typedef struct __packed {
|
typedef struct __packed {
|
||||||
uint8_t properties;
|
uint8_t properties;
|
||||||
uint16_t value_handle;
|
uint16_t value_handle;
|
||||||
uint8_t uuid[0]; // 2 or 16 bytes
|
uint8_t uuid[]; // 2 or 16 bytes
|
||||||
} characteristic_declaration_t;
|
} characteristic_declaration_t;
|
||||||
|
|
||||||
STATIC uint8_t bleio_properties_to_ble_spec_properties(uint8_t bleio_properties) {
|
STATIC uint8_t bleio_properties_to_ble_spec_properties(uint8_t bleio_properties) {
|
||||||
@ -1010,21 +1010,22 @@ void process_read_group_req(uint16_t conn_handle, uint16_t mtu, uint8_t dlen, ui
|
|||||||
}
|
}
|
||||||
|
|
||||||
int att_read_group_req(uint16_t conn_handle, uint16_t start_handle, uint16_t end_handle, uint16_t uuid, uint8_t response_buffer[]) {
|
int att_read_group_req(uint16_t conn_handle, uint16_t start_handle, uint16_t end_handle, uint16_t uuid, uint8_t response_buffer[]) {
|
||||||
struct __packed {
|
|
||||||
|
typedef struct __packed {
|
||||||
struct bt_att_hdr h;
|
struct bt_att_hdr h;
|
||||||
struct bt_att_read_group_req r;
|
struct bt_att_read_group_req r;
|
||||||
} req = { {
|
} req_t;
|
||||||
.code = BT_ATT_OP_READ_GROUP_REQ,
|
|
||||||
}, {
|
|
||||||
.start_handle = start_handle,
|
|
||||||
.end_handle = end_handle,
|
|
||||||
}
|
|
||||||
};
|
|
||||||
req.r.uuid[0] = uuid & 0xff;
|
|
||||||
req.r.uuid[1] = uuid >> 8;
|
|
||||||
|
|
||||||
|
uint8_t req_bytes[sizeof(req_t) + sizeof(uuid)];
|
||||||
|
req_t *req = (req_t *) req_bytes;
|
||||||
|
|
||||||
return send_req_wait_for_rsp(conn_handle, sizeof(req), (uint8_t *) &req, response_buffer);
|
req->h.code = BT_ATT_OP_READ_GROUP_REQ;
|
||||||
|
req->r.start_handle = start_handle;
|
||||||
|
req->r.end_handle = end_handle;
|
||||||
|
req->r.uuid[0] = uuid & 0xff;
|
||||||
|
req->r.uuid[1] = uuid >> 8;
|
||||||
|
|
||||||
|
return send_req_wait_for_rsp(conn_handle, sizeof(req_bytes), req_bytes, response_buffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
STATIC void process_read_group_rsp(uint16_t conn_handle, uint8_t dlen, uint8_t data[]) {
|
STATIC void process_read_group_rsp(uint16_t conn_handle, uint8_t dlen, uint8_t data[]) {
|
||||||
@ -1305,20 +1306,21 @@ STATIC void process_read_type_req(uint16_t conn_handle, uint16_t mtu, uint8_t dl
|
|||||||
}
|
}
|
||||||
|
|
||||||
int att_read_type_req(uint16_t conn_handle, uint16_t start_handle, uint16_t end_handle, uint16_t type, uint8_t response_buffer[]) {
|
int att_read_type_req(uint16_t conn_handle, uint16_t start_handle, uint16_t end_handle, uint16_t type, uint8_t response_buffer[]) {
|
||||||
struct __packed {
|
typedef struct __packed {
|
||||||
struct bt_att_hdr h;
|
struct bt_att_hdr h;
|
||||||
struct bt_att_read_type_req r;
|
struct bt_att_read_type_req r;
|
||||||
} req = { {
|
} req_t;
|
||||||
.code = BT_ATT_OP_READ_TYPE_REQ,
|
|
||||||
}, {
|
|
||||||
.start_handle = start_handle,
|
|
||||||
.end_handle = end_handle,
|
|
||||||
}
|
|
||||||
};
|
|
||||||
req.r.uuid[0] = type & 0xff;
|
|
||||||
req.r.uuid[1] = type >> 8;
|
|
||||||
|
|
||||||
return send_req_wait_for_rsp(conn_handle, sizeof(req), (uint8_t *) &req, response_buffer);
|
uint8_t req_bytes[sizeof(req_t) + sizeof(type)];
|
||||||
|
req_t *req = (req_t *) req_bytes;
|
||||||
|
|
||||||
|
req->h.code = BT_ATT_OP_READ_TYPE_REQ;
|
||||||
|
req->r.start_handle = start_handle;
|
||||||
|
req->r.end_handle = end_handle;
|
||||||
|
req->r.uuid[0] = type & 0xff;
|
||||||
|
req->r.uuid[1] = type >> 8;
|
||||||
|
|
||||||
|
return send_req_wait_for_rsp(conn_handle, sizeof(req_bytes), req_bytes, response_buffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
STATIC void process_read_type_rsp(uint16_t conn_handle, uint8_t dlen, uint8_t data[]) {
|
STATIC void process_read_type_rsp(uint16_t conn_handle, uint8_t dlen, uint8_t data[]) {
|
||||||
|
@ -69,7 +69,7 @@ struct bt_att_info_128 {
|
|||||||
#define BT_ATT_OP_FIND_INFO_RSP 0x05
|
#define BT_ATT_OP_FIND_INFO_RSP 0x05
|
||||||
struct bt_att_find_info_rsp {
|
struct bt_att_find_info_rsp {
|
||||||
uint8_t format;
|
uint8_t format;
|
||||||
uint8_t info[0];
|
uint8_t info[];
|
||||||
} __packed;
|
} __packed;
|
||||||
|
|
||||||
/* Find By Type Value Request */
|
/* Find By Type Value Request */
|
||||||
@ -78,7 +78,7 @@ struct bt_att_find_type_req {
|
|||||||
uint16_t start_handle;
|
uint16_t start_handle;
|
||||||
uint16_t end_handle;
|
uint16_t end_handle;
|
||||||
uint16_t type;
|
uint16_t type;
|
||||||
uint8_t value[0];
|
uint8_t value[];
|
||||||
} __packed;
|
} __packed;
|
||||||
|
|
||||||
struct bt_att_handle_group {
|
struct bt_att_handle_group {
|
||||||
@ -89,7 +89,8 @@ struct bt_att_handle_group {
|
|||||||
/* Find By Type Value Response */
|
/* Find By Type Value Response */
|
||||||
#define BT_ATT_OP_FIND_TYPE_RSP 0x07
|
#define BT_ATT_OP_FIND_TYPE_RSP 0x07
|
||||||
struct bt_att_find_type_rsp {
|
struct bt_att_find_type_rsp {
|
||||||
struct bt_att_handle_group list[0];
|
uint8_t _dummy[0];
|
||||||
|
struct bt_att_handle_group list[];
|
||||||
} __packed;
|
} __packed;
|
||||||
|
|
||||||
/* Read By Type Request */
|
/* Read By Type Request */
|
||||||
@ -97,19 +98,19 @@ struct bt_att_find_type_rsp {
|
|||||||
struct bt_att_read_type_req {
|
struct bt_att_read_type_req {
|
||||||
uint16_t start_handle;
|
uint16_t start_handle;
|
||||||
uint16_t end_handle;
|
uint16_t end_handle;
|
||||||
uint8_t uuid[0];
|
uint8_t uuid[];
|
||||||
} __packed;
|
} __packed;
|
||||||
|
|
||||||
struct bt_att_data {
|
struct bt_att_data {
|
||||||
uint16_t handle;
|
uint16_t handle;
|
||||||
uint8_t value[0];
|
uint8_t value[];
|
||||||
} __packed;
|
} __packed;
|
||||||
|
|
||||||
/* Read By Type Response */
|
/* Read By Type Response */
|
||||||
#define BT_ATT_OP_READ_TYPE_RSP 0x09
|
#define BT_ATT_OP_READ_TYPE_RSP 0x09
|
||||||
struct bt_att_read_type_rsp {
|
struct bt_att_read_type_rsp {
|
||||||
uint8_t len;
|
uint8_t len;
|
||||||
struct bt_att_data data[0];
|
struct bt_att_data data[];
|
||||||
} __packed;
|
} __packed;
|
||||||
|
|
||||||
/* Read Request */
|
/* Read Request */
|
||||||
@ -121,7 +122,8 @@ struct bt_att_read_req {
|
|||||||
/* Read Response */
|
/* Read Response */
|
||||||
#define BT_ATT_OP_READ_RSP 0x0b
|
#define BT_ATT_OP_READ_RSP 0x0b
|
||||||
struct bt_att_read_rsp {
|
struct bt_att_read_rsp {
|
||||||
uint8_t value[0];
|
uint8_t _dummy[0];
|
||||||
|
uint8_t value[];
|
||||||
} __packed;
|
} __packed;
|
||||||
|
|
||||||
/* Read Blob Request */
|
/* Read Blob Request */
|
||||||
@ -134,7 +136,8 @@ struct bt_att_read_blob_req {
|
|||||||
/* Read Blob Response */
|
/* Read Blob Response */
|
||||||
#define BT_ATT_OP_READ_BLOB_RSP 0x0d
|
#define BT_ATT_OP_READ_BLOB_RSP 0x0d
|
||||||
struct bt_att_read_blob_rsp {
|
struct bt_att_read_blob_rsp {
|
||||||
uint8_t value[0];
|
uint8_t _dummy[0];
|
||||||
|
uint8_t value[];
|
||||||
} __packed;
|
} __packed;
|
||||||
|
|
||||||
/* Read Multiple Request */
|
/* Read Multiple Request */
|
||||||
@ -142,13 +145,15 @@ struct bt_att_read_blob_rsp {
|
|||||||
|
|
||||||
#define BT_ATT_OP_READ_MULT_REQ 0x0e
|
#define BT_ATT_OP_READ_MULT_REQ 0x0e
|
||||||
struct bt_att_read_mult_req {
|
struct bt_att_read_mult_req {
|
||||||
uint16_t handles[0];
|
uint8_t _dummy[0];
|
||||||
|
uint16_t handles[];
|
||||||
} __packed;
|
} __packed;
|
||||||
|
|
||||||
/* Read Multiple Respose */
|
/* Read Multiple Respose */
|
||||||
#define BT_ATT_OP_READ_MULT_RSP 0x0f
|
#define BT_ATT_OP_READ_MULT_RSP 0x0f
|
||||||
struct bt_att_read_mult_rsp {
|
struct bt_att_read_mult_rsp {
|
||||||
uint8_t value[0];
|
uint8_t _dummy[0];
|
||||||
|
uint8_t value[];
|
||||||
} __packed;
|
} __packed;
|
||||||
|
|
||||||
/* Read by Group Type Request */
|
/* Read by Group Type Request */
|
||||||
@ -156,27 +161,27 @@ struct bt_att_read_mult_rsp {
|
|||||||
struct bt_att_read_group_req {
|
struct bt_att_read_group_req {
|
||||||
uint16_t start_handle;
|
uint16_t start_handle;
|
||||||
uint16_t end_handle;
|
uint16_t end_handle;
|
||||||
uint8_t uuid[0];
|
uint8_t uuid[];
|
||||||
} __packed;
|
} __packed;
|
||||||
|
|
||||||
struct bt_att_group_data {
|
struct bt_att_group_data {
|
||||||
uint16_t start_handle;
|
uint16_t start_handle;
|
||||||
uint16_t end_handle;
|
uint16_t end_handle;
|
||||||
uint8_t value[0];
|
uint8_t value[];
|
||||||
} __packed;
|
} __packed;
|
||||||
|
|
||||||
/* Read by Group Type Response */
|
/* Read by Group Type Response */
|
||||||
#define BT_ATT_OP_READ_GROUP_RSP 0x11
|
#define BT_ATT_OP_READ_GROUP_RSP 0x11
|
||||||
struct bt_att_read_group_rsp {
|
struct bt_att_read_group_rsp {
|
||||||
uint8_t len;
|
uint8_t len;
|
||||||
struct bt_att_group_data data[0];
|
struct bt_att_group_data data[];
|
||||||
} __packed;
|
} __packed;
|
||||||
|
|
||||||
/* Write Request */
|
/* Write Request */
|
||||||
#define BT_ATT_OP_WRITE_REQ 0x12
|
#define BT_ATT_OP_WRITE_REQ 0x12
|
||||||
struct bt_att_write_req {
|
struct bt_att_write_req {
|
||||||
uint16_t handle;
|
uint16_t handle;
|
||||||
uint8_t value[0];
|
uint8_t value[];
|
||||||
} __packed;
|
} __packed;
|
||||||
|
|
||||||
/* Write Response */
|
/* Write Response */
|
||||||
@ -187,7 +192,7 @@ struct bt_att_write_req {
|
|||||||
struct bt_att_prepare_write_req {
|
struct bt_att_prepare_write_req {
|
||||||
uint16_t handle;
|
uint16_t handle;
|
||||||
uint16_t offset;
|
uint16_t offset;
|
||||||
uint8_t value[0];
|
uint8_t value[];
|
||||||
} __packed;
|
} __packed;
|
||||||
|
|
||||||
/* Prepare Write Respond */
|
/* Prepare Write Respond */
|
||||||
@ -195,7 +200,7 @@ struct bt_att_prepare_write_req {
|
|||||||
struct bt_att_prepare_write_rsp {
|
struct bt_att_prepare_write_rsp {
|
||||||
uint16_t handle;
|
uint16_t handle;
|
||||||
uint16_t offset;
|
uint16_t offset;
|
||||||
uint8_t value[0];
|
uint8_t value[];
|
||||||
} __packed;
|
} __packed;
|
||||||
|
|
||||||
/* Execute Write Request */
|
/* Execute Write Request */
|
||||||
@ -214,14 +219,14 @@ struct bt_att_exec_write_req {
|
|||||||
#define BT_ATT_OP_NOTIFY 0x1b
|
#define BT_ATT_OP_NOTIFY 0x1b
|
||||||
struct bt_att_notify {
|
struct bt_att_notify {
|
||||||
uint16_t handle;
|
uint16_t handle;
|
||||||
uint8_t value[0];
|
uint8_t value[];
|
||||||
} __packed;
|
} __packed;
|
||||||
|
|
||||||
/* Handle Value Indication */
|
/* Handle Value Indication */
|
||||||
#define BT_ATT_OP_INDICATE 0x1d
|
#define BT_ATT_OP_INDICATE 0x1d
|
||||||
struct bt_att_indicate {
|
struct bt_att_indicate {
|
||||||
uint16_t handle;
|
uint16_t handle;
|
||||||
uint8_t value[0];
|
uint8_t value[];
|
||||||
} __packed;
|
} __packed;
|
||||||
|
|
||||||
/* Handle Value Confirm */
|
/* Handle Value Confirm */
|
||||||
@ -233,14 +238,15 @@ struct bt_att_signature {
|
|||||||
|
|
||||||
#define BT_ATT_OP_READ_MULT_VL_REQ 0x20
|
#define BT_ATT_OP_READ_MULT_VL_REQ 0x20
|
||||||
struct bt_att_read_mult_vl_req {
|
struct bt_att_read_mult_vl_req {
|
||||||
uint16_t handles[0];
|
uint8_t _dummy[0];
|
||||||
|
uint16_t handles[];
|
||||||
} __packed;
|
} __packed;
|
||||||
|
|
||||||
/* Read Multiple Respose */
|
/* Read Multiple Respose */
|
||||||
#define BT_ATT_OP_READ_MULT_VL_RSP 0x21
|
#define BT_ATT_OP_READ_MULT_VL_RSP 0x21
|
||||||
struct bt_att_read_mult_vl_rsp {
|
struct bt_att_read_mult_vl_rsp {
|
||||||
uint16_t len;
|
uint16_t len;
|
||||||
uint8_t value[0];
|
uint8_t value[];
|
||||||
} __packed;
|
} __packed;
|
||||||
|
|
||||||
/* Handle Multiple Value Notification */
|
/* Handle Multiple Value Notification */
|
||||||
@ -248,19 +254,19 @@ struct bt_att_read_mult_vl_rsp {
|
|||||||
struct bt_att_notify_mult {
|
struct bt_att_notify_mult {
|
||||||
uint16_t handle;
|
uint16_t handle;
|
||||||
uint16_t len;
|
uint16_t len;
|
||||||
uint8_t value[0];
|
uint8_t value[];
|
||||||
} __packed;
|
} __packed;
|
||||||
|
|
||||||
/* Write Command */
|
/* Write Command */
|
||||||
#define BT_ATT_OP_WRITE_CMD 0x52
|
#define BT_ATT_OP_WRITE_CMD 0x52
|
||||||
struct bt_att_write_cmd {
|
struct bt_att_write_cmd {
|
||||||
uint16_t handle;
|
uint16_t handle;
|
||||||
uint8_t value[0];
|
uint8_t value[];
|
||||||
} __packed;
|
} __packed;
|
||||||
|
|
||||||
/* Signed Write Command */
|
/* Signed Write Command */
|
||||||
#define BT_ATT_OP_SIGNED_WRITE_CMD 0xd2
|
#define BT_ATT_OP_SIGNED_WRITE_CMD 0xd2
|
||||||
struct bt_att_signed_write_cmd {
|
struct bt_att_signed_write_cmd {
|
||||||
uint16_t handle;
|
uint16_t handle;
|
||||||
uint8_t value[0];
|
uint8_t value[];
|
||||||
} __packed;
|
} __packed;
|
||||||
|
@ -454,7 +454,7 @@ struct bt_hci_handle_count {
|
|||||||
#define BT_HCI_OP_HOST_NUM_COMPLETED_PACKETS BT_OP(BT_OGF_BASEBAND, 0x0035)
|
#define BT_HCI_OP_HOST_NUM_COMPLETED_PACKETS BT_OP(BT_OGF_BASEBAND, 0x0035)
|
||||||
struct bt_hci_cp_host_num_completed_packets {
|
struct bt_hci_cp_host_num_completed_packets {
|
||||||
uint8_t num_handles;
|
uint8_t num_handles;
|
||||||
struct bt_hci_handle_count h[0];
|
struct bt_hci_handle_count h[];
|
||||||
} __packed;
|
} __packed;
|
||||||
|
|
||||||
#define BT_HCI_OP_WRITE_INQUIRY_MODE BT_OP(BT_OGF_BASEBAND, 0x0045)
|
#define BT_HCI_OP_WRITE_INQUIRY_MODE BT_OP(BT_OGF_BASEBAND, 0x0045)
|
||||||
@ -1099,7 +1099,7 @@ struct bt_hci_ext_adv_set {
|
|||||||
struct bt_hci_cp_le_set_ext_adv_enable {
|
struct bt_hci_cp_le_set_ext_adv_enable {
|
||||||
uint8_t enable;
|
uint8_t enable;
|
||||||
uint8_t set_num;
|
uint8_t set_num;
|
||||||
struct bt_hci_ext_adv_set s[0];
|
struct bt_hci_ext_adv_set s[];
|
||||||
} __packed;
|
} __packed;
|
||||||
|
|
||||||
#define BT_HCI_OP_LE_READ_MAX_ADV_DATA_LEN BT_OP(BT_OGF_LE, 0x003a)
|
#define BT_HCI_OP_LE_READ_MAX_ADV_DATA_LEN BT_OP(BT_OGF_LE, 0x003a)
|
||||||
@ -1158,7 +1158,7 @@ struct bt_hci_cp_le_set_ext_scan_param {
|
|||||||
uint8_t own_addr_type;
|
uint8_t own_addr_type;
|
||||||
uint8_t filter_policy;
|
uint8_t filter_policy;
|
||||||
uint8_t phys;
|
uint8_t phys;
|
||||||
struct bt_hci_ext_scan_phy p[0];
|
struct bt_hci_ext_scan_phy p[];
|
||||||
} __packed;
|
} __packed;
|
||||||
|
|
||||||
/* Extends BT_HCI_LE_SCAN_FILTER_DUP */
|
/* Extends BT_HCI_LE_SCAN_FILTER_DUP */
|
||||||
@ -1189,7 +1189,7 @@ struct bt_hci_cp_le_ext_create_conn {
|
|||||||
uint8_t own_addr_type;
|
uint8_t own_addr_type;
|
||||||
bt_addr_le_t peer_addr;
|
bt_addr_le_t peer_addr;
|
||||||
uint8_t phys;
|
uint8_t phys;
|
||||||
struct bt_hci_ext_conn_phy p[0];
|
struct bt_hci_ext_conn_phy p[];
|
||||||
} __packed;
|
} __packed;
|
||||||
|
|
||||||
#define BT_HCI_OP_LE_PER_ADV_CREATE_SYNC BT_OP(BT_OGF_LE, 0x0044)
|
#define BT_HCI_OP_LE_PER_ADV_CREATE_SYNC BT_OP(BT_OGF_LE, 0x0044)
|
||||||
@ -1354,7 +1354,7 @@ struct bt_hci_evt_role_change {
|
|||||||
#define BT_HCI_EVT_NUM_COMPLETED_PACKETS 0x13
|
#define BT_HCI_EVT_NUM_COMPLETED_PACKETS 0x13
|
||||||
struct bt_hci_evt_num_completed_packets {
|
struct bt_hci_evt_num_completed_packets {
|
||||||
uint8_t num_handles;
|
uint8_t num_handles;
|
||||||
struct bt_hci_handle_count h[0];
|
struct bt_hci_handle_count h[];
|
||||||
} __packed;
|
} __packed;
|
||||||
|
|
||||||
#define BT_HCI_EVT_PIN_CODE_REQ 0x16
|
#define BT_HCI_EVT_PIN_CODE_REQ 0x16
|
||||||
@ -1510,11 +1510,11 @@ struct bt_hci_evt_le_advertising_info {
|
|||||||
uint8_t evt_type;
|
uint8_t evt_type;
|
||||||
bt_addr_le_t addr;
|
bt_addr_le_t addr;
|
||||||
uint8_t length;
|
uint8_t length;
|
||||||
uint8_t data[0];
|
uint8_t data[];
|
||||||
} __packed;
|
} __packed;
|
||||||
struct bt_hci_evt_le_advertising_report {
|
struct bt_hci_evt_le_advertising_report {
|
||||||
uint8_t num_reports;
|
uint8_t num_reports;
|
||||||
struct bt_hci_evt_le_advertising_info adv_info[0];
|
struct bt_hci_evt_le_advertising_info adv_info[];
|
||||||
} __packed;
|
} __packed;
|
||||||
|
|
||||||
#define BT_HCI_EVT_LE_CONN_UPDATE_COMPLETE 0x03
|
#define BT_HCI_EVT_LE_CONN_UPDATE_COMPLETE 0x03
|
||||||
@ -1593,7 +1593,7 @@ struct bt_hci_evt_le_direct_adv_info {
|
|||||||
} __packed;
|
} __packed;
|
||||||
struct bt_hci_evt_le_direct_adv_report {
|
struct bt_hci_evt_le_direct_adv_report {
|
||||||
uint8_t num_reports;
|
uint8_t num_reports;
|
||||||
struct bt_hci_evt_le_direct_adv_info direct_adv_info[0];
|
struct bt_hci_evt_le_direct_adv_info direct_adv_info[];
|
||||||
} __packed;
|
} __packed;
|
||||||
|
|
||||||
#define BT_HCI_EVT_LE_PHY_UPDATE_COMPLETE 0x0c
|
#define BT_HCI_EVT_LE_PHY_UPDATE_COMPLETE 0x0c
|
||||||
@ -1628,11 +1628,11 @@ struct bt_hci_evt_le_ext_advertising_info {
|
|||||||
uint16_t interval;
|
uint16_t interval;
|
||||||
bt_addr_le_t direct_addr;
|
bt_addr_le_t direct_addr;
|
||||||
uint8_t length;
|
uint8_t length;
|
||||||
uint8_t data[0];
|
uint8_t data[];
|
||||||
} __packed;
|
} __packed;
|
||||||
struct bt_hci_evt_le_ext_advertising_report {
|
struct bt_hci_evt_le_ext_advertising_report {
|
||||||
uint8_t num_reports;
|
uint8_t num_reports;
|
||||||
struct bt_hci_evt_le_ext_advertising_info adv_info[0];
|
struct bt_hci_evt_le_ext_advertising_info adv_info[];
|
||||||
} __packed;
|
} __packed;
|
||||||
|
|
||||||
#define BT_HCI_EVT_LE_PER_ADV_SYNC_ESTABLISHED 0x0e
|
#define BT_HCI_EVT_LE_PER_ADV_SYNC_ESTABLISHED 0x0e
|
||||||
@ -1654,7 +1654,7 @@ struct bt_hci_evt_le_per_advertising_report {
|
|||||||
uint8_t unused;
|
uint8_t unused;
|
||||||
uint8_t data_status;
|
uint8_t data_status;
|
||||||
uint8_t length;
|
uint8_t length;
|
||||||
uint8_t data[0];
|
uint8_t data[];
|
||||||
} __packed;
|
} __packed;
|
||||||
|
|
||||||
#define BT_HCI_EVT_LE_PER_ADV_SYNC_LOST 0x10
|
#define BT_HCI_EVT_LE_PER_ADV_SYNC_LOST 0x10
|
||||||
|
@ -104,7 +104,7 @@ struct bt_hci_cp_vs_set_trace_enable {
|
|||||||
#define BT_HCI_OP_VS_READ_BUILD_INFO BT_OP(BT_OGF_VS, 0x0008)
|
#define BT_HCI_OP_VS_READ_BUILD_INFO BT_OP(BT_OGF_VS, 0x0008)
|
||||||
struct bt_hci_rp_vs_read_build_info {
|
struct bt_hci_rp_vs_read_build_info {
|
||||||
uint8_t status;
|
uint8_t status;
|
||||||
uint8_t info[0];
|
uint8_t info[];
|
||||||
} __packed;
|
} __packed;
|
||||||
|
|
||||||
struct bt_hci_vs_static_addr {
|
struct bt_hci_vs_static_addr {
|
||||||
@ -116,7 +116,7 @@ struct bt_hci_vs_static_addr {
|
|||||||
struct bt_hci_rp_vs_read_static_addrs {
|
struct bt_hci_rp_vs_read_static_addrs {
|
||||||
uint8_t status;
|
uint8_t status;
|
||||||
uint8_t num_addrs;
|
uint8_t num_addrs;
|
||||||
struct bt_hci_vs_static_addr a[0];
|
struct bt_hci_vs_static_addr a[];
|
||||||
} __packed;
|
} __packed;
|
||||||
|
|
||||||
#define BT_HCI_OP_VS_READ_KEY_HIERARCHY_ROOTS BT_OP(BT_OGF_VS, 0x000a)
|
#define BT_HCI_OP_VS_READ_KEY_HIERARCHY_ROOTS BT_OP(BT_OGF_VS, 0x000a)
|
||||||
@ -143,7 +143,7 @@ struct bt_hci_vs_cmd {
|
|||||||
struct bt_hci_rp_vs_read_host_stack_cmds {
|
struct bt_hci_rp_vs_read_host_stack_cmds {
|
||||||
uint8_t status;
|
uint8_t status;
|
||||||
uint8_t num_cmds;
|
uint8_t num_cmds;
|
||||||
struct bt_hci_vs_cmd c[0];
|
struct bt_hci_vs_cmd c[];
|
||||||
} __packed;
|
} __packed;
|
||||||
|
|
||||||
#define BT_HCI_VS_SCAN_REQ_REPORTS_DISABLED 0x00
|
#define BT_HCI_VS_SCAN_REQ_REPORTS_DISABLED 0x00
|
||||||
@ -189,7 +189,7 @@ struct bt_hci_rp_vs_read_tx_power_level {
|
|||||||
struct bt_hci_rp_vs_read_usb_transport_mode {
|
struct bt_hci_rp_vs_read_usb_transport_mode {
|
||||||
uint8_t status;
|
uint8_t status;
|
||||||
uint8_t num_supported_modes;
|
uint8_t num_supported_modes;
|
||||||
uint8_t supported_mode[0];
|
uint8_t supported_mode[];
|
||||||
} __packed;
|
} __packed;
|
||||||
|
|
||||||
#define BT_HCI_VS_USB_H2_MODE 0x00
|
#define BT_HCI_VS_USB_H2_MODE 0x00
|
||||||
@ -210,7 +210,7 @@ struct bt_hci_evt_vs {
|
|||||||
#define BT_HCI_EVT_VS_FATAL_ERROR 0x02
|
#define BT_HCI_EVT_VS_FATAL_ERROR 0x02
|
||||||
struct bt_hci_evt_vs_fatal_error {
|
struct bt_hci_evt_vs_fatal_error {
|
||||||
uint64_t pc;
|
uint64_t pc;
|
||||||
uint8_t err_info[0];
|
uint8_t err_info[];
|
||||||
} __packed;
|
} __packed;
|
||||||
|
|
||||||
#define BT_HCI_VS_TRACE_LMP_TX 0x01
|
#define BT_HCI_VS_TRACE_LMP_TX 0x01
|
||||||
@ -221,7 +221,7 @@ struct bt_hci_evt_vs_fatal_error {
|
|||||||
#define BT_HCI_EVT_VS_TRACE_INFO 0x03
|
#define BT_HCI_EVT_VS_TRACE_INFO 0x03
|
||||||
struct bt_hci_evt_vs_trace_info {
|
struct bt_hci_evt_vs_trace_info {
|
||||||
uint8_t type;
|
uint8_t type;
|
||||||
uint8_t data[0];
|
uint8_t data[];
|
||||||
} __packed;
|
} __packed;
|
||||||
|
|
||||||
#define BT_HCI_EVT_VS_SCAN_REQ_RX 0x04
|
#define BT_HCI_EVT_VS_SCAN_REQ_RX 0x04
|
||||||
@ -267,14 +267,14 @@ struct bt_hci_rp_mesh_get_opts {
|
|||||||
#define BT_HCI_OC_MESH_SET_SCAN_FILTER 0x01
|
#define BT_HCI_OC_MESH_SET_SCAN_FILTER 0x01
|
||||||
struct bt_hci_mesh_pattern {
|
struct bt_hci_mesh_pattern {
|
||||||
uint8_t pattern_len;
|
uint8_t pattern_len;
|
||||||
uint8_t pattern[0];
|
uint8_t pattern[];
|
||||||
} __packed;
|
} __packed;
|
||||||
|
|
||||||
struct bt_hci_cp_mesh_set_scan_filter {
|
struct bt_hci_cp_mesh_set_scan_filter {
|
||||||
uint8_t scan_filter;
|
uint8_t scan_filter;
|
||||||
uint8_t filter_dup;
|
uint8_t filter_dup;
|
||||||
uint8_t num_patterns;
|
uint8_t num_patterns;
|
||||||
struct bt_hci_mesh_pattern patterns[0];
|
struct bt_hci_mesh_pattern patterns[];
|
||||||
} __packed;
|
} __packed;
|
||||||
struct bt_hci_rp_mesh_set_scan_filter {
|
struct bt_hci_rp_mesh_set_scan_filter {
|
||||||
uint8_t status;
|
uint8_t status;
|
||||||
@ -365,11 +365,11 @@ struct bt_hci_evt_mesh_scan_report {
|
|||||||
int8_t rssi;
|
int8_t rssi;
|
||||||
uint32_t instant;
|
uint32_t instant;
|
||||||
uint8_t data_len;
|
uint8_t data_len;
|
||||||
uint8_t data[0];
|
uint8_t data[];
|
||||||
} __packed;
|
} __packed;
|
||||||
struct bt_hci_evt_mesh_scanning_report {
|
struct bt_hci_evt_mesh_scanning_report {
|
||||||
uint8_t num_reports;
|
uint8_t num_reports;
|
||||||
struct bt_hci_evt_mesh_scan_report reports[0];
|
struct bt_hci_evt_mesh_scan_report reports[];
|
||||||
} __packed;
|
} __packed;
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
@ -45,7 +45,7 @@ struct bt_l2cap_sig_hdr {
|
|||||||
#define BT_L2CAP_CMD_REJECT 0x01
|
#define BT_L2CAP_CMD_REJECT 0x01
|
||||||
struct bt_l2cap_cmd_reject {
|
struct bt_l2cap_cmd_reject {
|
||||||
uint16_t reason;
|
uint16_t reason;
|
||||||
uint8_t data[0];
|
uint8_t data[];
|
||||||
} __packed;
|
} __packed;
|
||||||
|
|
||||||
struct bt_l2cap_cmd_reject_cid_data {
|
struct bt_l2cap_cmd_reject_cid_data {
|
||||||
@ -88,7 +88,7 @@ struct bt_l2cap_conn_rsp {
|
|||||||
struct bt_l2cap_conf_req {
|
struct bt_l2cap_conf_req {
|
||||||
uint16_t dcid;
|
uint16_t dcid;
|
||||||
uint16_t flags;
|
uint16_t flags;
|
||||||
uint8_t data[0];
|
uint8_t data[];
|
||||||
} __packed;
|
} __packed;
|
||||||
|
|
||||||
#define BT_L2CAP_CONF_RSP 0x05
|
#define BT_L2CAP_CONF_RSP 0x05
|
||||||
@ -96,7 +96,7 @@ struct bt_l2cap_conf_rsp {
|
|||||||
uint16_t scid;
|
uint16_t scid;
|
||||||
uint16_t flags;
|
uint16_t flags;
|
||||||
uint16_t result;
|
uint16_t result;
|
||||||
uint8_t data[0];
|
uint8_t data[];
|
||||||
} __packed;
|
} __packed;
|
||||||
|
|
||||||
/* Option type used by MTU config request data */
|
/* Option type used by MTU config request data */
|
||||||
@ -108,7 +108,7 @@ struct bt_l2cap_conf_rsp {
|
|||||||
struct bt_l2cap_conf_opt {
|
struct bt_l2cap_conf_opt {
|
||||||
uint8_t type;
|
uint8_t type;
|
||||||
uint8_t len;
|
uint8_t len;
|
||||||
uint8_t data[0];
|
uint8_t data[];
|
||||||
} __packed;
|
} __packed;
|
||||||
|
|
||||||
#define BT_L2CAP_DISCONN_REQ 0x06
|
#define BT_L2CAP_DISCONN_REQ 0x06
|
||||||
@ -139,7 +139,7 @@ struct bt_l2cap_info_req {
|
|||||||
struct bt_l2cap_info_rsp {
|
struct bt_l2cap_info_rsp {
|
||||||
uint16_t type;
|
uint16_t type;
|
||||||
uint16_t result;
|
uint16_t result;
|
||||||
uint8_t data[0];
|
uint8_t data[];
|
||||||
} __packed;
|
} __packed;
|
||||||
|
|
||||||
#define BT_L2CAP_CONN_PARAM_REQ 0x12
|
#define BT_L2CAP_CONN_PARAM_REQ 0x12
|
||||||
@ -201,7 +201,7 @@ struct bt_l2cap_ecred_conn_req {
|
|||||||
uint16_t mtu;
|
uint16_t mtu;
|
||||||
uint16_t mps;
|
uint16_t mps;
|
||||||
uint16_t credits;
|
uint16_t credits;
|
||||||
uint16_t scid[0];
|
uint16_t scid[];
|
||||||
} __packed;
|
} __packed;
|
||||||
|
|
||||||
#define BT_L2CAP_ECRED_CONN_RSP 0x18
|
#define BT_L2CAP_ECRED_CONN_RSP 0x18
|
||||||
@ -210,14 +210,14 @@ struct bt_l2cap_ecred_conn_rsp {
|
|||||||
uint16_t mps;
|
uint16_t mps;
|
||||||
uint16_t credits;
|
uint16_t credits;
|
||||||
uint16_t result;
|
uint16_t result;
|
||||||
uint16_t dcid[0];
|
uint16_t dcid[];
|
||||||
} __packed;
|
} __packed;
|
||||||
|
|
||||||
#define BT_L2CAP_ECRED_RECONF_REQ 0x19
|
#define BT_L2CAP_ECRED_RECONF_REQ 0x19
|
||||||
struct bt_l2cap_ecred_reconf_req {
|
struct bt_l2cap_ecred_reconf_req {
|
||||||
uint16_t mtu;
|
uint16_t mtu;
|
||||||
uint16_t mps;
|
uint16_t mps;
|
||||||
uint16_t scid[0];
|
uint16_t scid[];
|
||||||
} __packed;
|
} __packed;
|
||||||
|
|
||||||
#define BT_L2CAP_RECONF_SUCCESS 0x0000
|
#define BT_L2CAP_RECONF_SUCCESS 0x0000
|
||||||
|
@ -94,21 +94,21 @@ endif
|
|||||||
|
|
||||||
ifeq ($(CHIP_FAMILY), samd51)
|
ifeq ($(CHIP_FAMILY), samd51)
|
||||||
PERIPHERALS_CHIP_FAMILY=sam_d5x_e5x
|
PERIPHERALS_CHIP_FAMILY=sam_d5x_e5x
|
||||||
OPTIMIZATION_FLAGS ?= -O2
|
OPTIMIZATION_FLAGS ?= -O2 -fno-inline-functions
|
||||||
# TinyUSB defines
|
# TinyUSB defines
|
||||||
CFLAGS += -DCFG_TUSB_MCU=OPT_MCU_SAMD51 -DCFG_TUD_MIDI_RX_BUFSIZE=128 -DCFG_TUD_CDC_RX_BUFSIZE=256 -DCFG_TUD_MIDI_TX_BUFSIZE=128 -DCFG_TUD_CDC_TX_BUFSIZE=256 -DCFG_TUD_MSC_BUFSIZE=1024
|
CFLAGS += -DCFG_TUSB_MCU=OPT_MCU_SAMD51 -DCFG_TUD_MIDI_RX_BUFSIZE=128 -DCFG_TUD_CDC_RX_BUFSIZE=256 -DCFG_TUD_MIDI_TX_BUFSIZE=128 -DCFG_TUD_CDC_TX_BUFSIZE=256 -DCFG_TUD_MSC_BUFSIZE=1024
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(CHIP_FAMILY), same51)
|
ifeq ($(CHIP_FAMILY), same51)
|
||||||
PERIPHERALS_CHIP_FAMILY=sam_d5x_e5x
|
PERIPHERALS_CHIP_FAMILY=sam_d5x_e5x
|
||||||
OPTIMIZATION_FLAGS ?= -O2
|
OPTIMIZATION_FLAGS ?= -O2 -fno-inline-functions
|
||||||
# TinyUSB defines
|
# TinyUSB defines
|
||||||
CFLAGS += -DCFG_TUSB_MCU=OPT_MCU_SAME5X -DCFG_TUD_MIDI_RX_BUFSIZE=128 -DCFG_TUD_CDC_RX_BUFSIZE=256 -DCFG_TUD_MIDI_TX_BUFSIZE=128 -DCFG_TUD_CDC_TX_BUFSIZE=256 -DCFG_TUD_MSC_BUFSIZE=1024
|
CFLAGS += -DCFG_TUSB_MCU=OPT_MCU_SAME5X -DCFG_TUD_MIDI_RX_BUFSIZE=128 -DCFG_TUD_CDC_RX_BUFSIZE=256 -DCFG_TUD_MIDI_TX_BUFSIZE=128 -DCFG_TUD_CDC_TX_BUFSIZE=256 -DCFG_TUD_MSC_BUFSIZE=1024
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(CHIP_FAMILY), same54)
|
ifeq ($(CHIP_FAMILY), same54)
|
||||||
PERIPHERALS_CHIP_FAMILY=sam_d5x_e5x
|
PERIPHERALS_CHIP_FAMILY=sam_d5x_e5x
|
||||||
OPTIMIZATION_FLAGS ?= -O2
|
OPTIMIZATION_FLAGS ?= -O2 -fno-inline-functions
|
||||||
# TinyUSB defines
|
# TinyUSB defines
|
||||||
CFLAGS += -DCFG_TUSB_MCU=OPT_MCU_SAME5X -DCFG_TUD_MIDI_RX_BUFSIZE=128 -DCFG_TUD_CDC_RX_BUFSIZE=256 -DCFG_TUD_MIDI_TX_BUFSIZE=128 -DCFG_TUD_CDC_TX_BUFSIZE=256 -DCFG_TUD_MSC_BUFSIZE=1024
|
CFLAGS += -DCFG_TUSB_MCU=OPT_MCU_SAME5X -DCFG_TUD_MIDI_RX_BUFSIZE=128 -DCFG_TUD_CDC_RX_BUFSIZE=256 -DCFG_TUD_MIDI_TX_BUFSIZE=128 -DCFG_TUD_CDC_TX_BUFSIZE=256 -DCFG_TUD_MSC_BUFSIZE=1024
|
||||||
endif
|
endif
|
||||||
@ -116,6 +116,9 @@ endif
|
|||||||
# option to override default optimization level, set in boards/$(BOARD)/mpconfigboard.mk
|
# option to override default optimization level, set in boards/$(BOARD)/mpconfigboard.mk
|
||||||
CFLAGS += $(OPTIMIZATION_FLAGS)
|
CFLAGS += $(OPTIMIZATION_FLAGS)
|
||||||
|
|
||||||
|
# Add -ftree-vrp optimization and checking to all builds. It's not enabled for -Os by default.
|
||||||
|
CFLAGS += -ftree-vrp
|
||||||
|
|
||||||
$(echo PERIPHERALS_CHIP_FAMILY=$(PERIPHERALS_CHIP_FAMILY))
|
$(echo PERIPHERALS_CHIP_FAMILY=$(PERIPHERALS_CHIP_FAMILY))
|
||||||
#Debugging/Optimization
|
#Debugging/Optimization
|
||||||
ifeq ($(DEBUG), 1)
|
ifeq ($(DEBUG), 1)
|
||||||
|
@ -9,3 +9,5 @@ CHIP_FAMILY = samd21
|
|||||||
INTERNAL_FLASH_FILESYSTEM = 1
|
INTERNAL_FLASH_FILESYSTEM = 1
|
||||||
LONGINT_IMPL = NONE
|
LONGINT_IMPL = NONE
|
||||||
CIRCUITPY_FULL_BUILD = 0
|
CIRCUITPY_FULL_BUILD = 0
|
||||||
|
|
||||||
|
SUPEROPT_GC = 0
|
||||||
|
@ -16,3 +16,5 @@ CIRCUITPY_AUDIOBUSIO = 0
|
|||||||
CIRCUITPY_VECTORIO = 0
|
CIRCUITPY_VECTORIO = 0
|
||||||
|
|
||||||
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_DotStar
|
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_DotStar
|
||||||
|
|
||||||
|
SUPEROPT_GC = 0
|
||||||
|
@ -122,7 +122,7 @@ CFLAGS += \
|
|||||||
-fdata-sections \
|
-fdata-sections \
|
||||||
-Wall \
|
-Wall \
|
||||||
|
|
||||||
OPTIMIZATION_FLAGS ?= -O2
|
OPTIMIZATION_FLAGS ?= -O2 -fno-inline-functions
|
||||||
|
|
||||||
# option to override compiler optimization level, set in boards/$(BOARD)/mpconfigboard.mk
|
# option to override compiler optimization level, set in boards/$(BOARD)/mpconfigboard.mk
|
||||||
CFLAGS += $(OPTIMIZATION_FLAGS)
|
CFLAGS += $(OPTIMIZATION_FLAGS)
|
||||||
|
@ -80,7 +80,7 @@ ifeq ($(DEBUG), 1)
|
|||||||
OPTIMIZATION_FLAGS ?= -Og
|
OPTIMIZATION_FLAGS ?= -Og
|
||||||
else
|
else
|
||||||
CFLAGS += -DNDEBUG -ggdb3
|
CFLAGS += -DNDEBUG -ggdb3
|
||||||
OPTIMIZATION_FLAGS ?= -O2
|
OPTIMIZATION_FLAGS ?= -O2 -fno-inline-functions
|
||||||
# TODO: Test with -flto
|
# TODO: Test with -flto
|
||||||
### CFLAGS += -flto
|
### CFLAGS += -flto
|
||||||
endif
|
endif
|
||||||
|
@ -75,7 +75,7 @@ INC += \
|
|||||||
|
|
||||||
# NDEBUG disables assert() statements. This reduces code size pretty dramatically, per tannewt.
|
# NDEBUG disables assert() statements. This reduces code size pretty dramatically, per tannewt.
|
||||||
|
|
||||||
CFLAGS += -Os -DNDEBUG -ffreestanding
|
CFLAGS += -Os -ftree-vrp -DNDEBUG -ffreestanding
|
||||||
|
|
||||||
# TinyUSB defines
|
# TinyUSB defines
|
||||||
CFLAGS += -DCFG_TUSB_MCU=OPT_MCU_MIMXRT10XX -DCFG_TUD_MIDI_RX_BUFSIZE=512 -DCFG_TUD_CDC_RX_BUFSIZE=512 -DCFG_TUD_MIDI_TX_BUFSIZE=512 -DCFG_TUD_CDC_TX_BUFSIZE=512 -DCFG_TUD_MSC_BUFSIZE=1024
|
CFLAGS += -DCFG_TUSB_MCU=OPT_MCU_MIMXRT10XX -DCFG_TUD_MIDI_RX_BUFSIZE=512 -DCFG_TUD_CDC_RX_BUFSIZE=512 -DCFG_TUD_MIDI_TX_BUFSIZE=512 -DCFG_TUD_CDC_TX_BUFSIZE=512 -DCFG_TUD_MSC_BUFSIZE=1024
|
||||||
@ -108,7 +108,7 @@ CFLAGS += \
|
|||||||
-g3 -Wno-unused-parameter \
|
-g3 -Wno-unused-parameter \
|
||||||
-ffunction-sections -fdata-sections -fstack-usage
|
-ffunction-sections -fdata-sections -fstack-usage
|
||||||
|
|
||||||
OPTIMIZATION_FLAGS ?= -O2
|
OPTIMIZATION_FLAGS ?= -O2 -fno-inline-functions
|
||||||
|
|
||||||
# option to override compiler optimization level, set in boards/$(BOARD)/mpconfigboard.mk
|
# option to override compiler optimization level, set in boards/$(BOARD)/mpconfigboard.mk
|
||||||
CFLAGS += $(OPTIMIZATION_FLAGS)
|
CFLAGS += $(OPTIMIZATION_FLAGS)
|
||||||
|
@ -89,7 +89,7 @@ ifeq ($(DEBUG), 1)
|
|||||||
CFLAGS += -ggdb3
|
CFLAGS += -ggdb3
|
||||||
OPTIMIZATION_FLAGS = -Og
|
OPTIMIZATION_FLAGS = -Og
|
||||||
else
|
else
|
||||||
OPTIMIZATION_FLAGS ?= -O2
|
OPTIMIZATION_FLAGS ?= -O2 -fno-inline-functions
|
||||||
CFLAGS += -DNDEBUG -ggdb3
|
CFLAGS += -DNDEBUG -ggdb3
|
||||||
CFLAGS += -flto -flto-partition=none
|
CFLAGS += -flto -flto-partition=none
|
||||||
endif
|
endif
|
||||||
|
@ -16,12 +16,14 @@ CIRCUITPY_AUDIOMP3 = 0
|
|||||||
CIRCUITPY_BUSIO = 1
|
CIRCUITPY_BUSIO = 1
|
||||||
CIRCUITPY_DISPLAYIO = 0
|
CIRCUITPY_DISPLAYIO = 0
|
||||||
CIRCUITPY_FRAMEBUFFERIO = 0
|
CIRCUITPY_FRAMEBUFFERIO = 0
|
||||||
|
CIRCUITPY_GAMEPAD = 0
|
||||||
CIRCUITPY_NEOPIXEL_WRITE = 0
|
CIRCUITPY_NEOPIXEL_WRITE = 0
|
||||||
CIRCUITPY_NVM = 0
|
CIRCUITPY_NVM = 0
|
||||||
CIRCUITPY_PIXELBUF = 0
|
CIRCUITPY_PIXELBUF = 0
|
||||||
CIRCUITPY_RGBMATRIX = 0
|
CIRCUITPY_RGBMATRIX = 0
|
||||||
CIRCUITPY_ROTARYIO = 0
|
CIRCUITPY_ROTARYIO = 0
|
||||||
CIRCUITPY_RTC = 1
|
CIRCUITPY_RTC = 1
|
||||||
|
CIRCUITPY_SDCARDIO = 0
|
||||||
CIRCUITPY_TOUCHIO = 0
|
CIRCUITPY_TOUCHIO = 0
|
||||||
CIRCUITPY_ULAB = 0
|
CIRCUITPY_ULAB = 0
|
||||||
CIRCUITPY_WATCHDOG = 1
|
CIRCUITPY_WATCHDOG = 1
|
||||||
|
@ -86,7 +86,7 @@ ifeq ($(DEBUG), 1)
|
|||||||
CFLAGS += -fno-inline -fno-ipa-sra
|
CFLAGS += -fno-inline -fno-ipa-sra
|
||||||
else
|
else
|
||||||
CFLAGS += -DNDEBUG
|
CFLAGS += -DNDEBUG
|
||||||
OPTIMIZATION_FLAGS ?= -O2
|
OPTIMIZATION_FLAGS ?= -O2 -fno-inline-functions
|
||||||
CFLAGS += -ggdb3
|
CFLAGS += -ggdb3
|
||||||
# TODO: Test with -flto
|
# TODO: Test with -flto
|
||||||
# CFLAGS += -flto
|
# CFLAGS += -flto
|
||||||
@ -95,6 +95,9 @@ endif
|
|||||||
# to override compiler optimization level, set in boards/$(BOARD)/mpconfigboard.mk
|
# to override compiler optimization level, set in boards/$(BOARD)/mpconfigboard.mk
|
||||||
CFLAGS += $(OPTIMIZATION_FLAGS)
|
CFLAGS += $(OPTIMIZATION_FLAGS)
|
||||||
|
|
||||||
|
# Add -ftree-vrp optimization and checking to all builds. It's not enabled for -Os by default.
|
||||||
|
CFLAGS += -ftree-vrp
|
||||||
|
|
||||||
# MCU Series is defined by the HAL package and doesn't need to be specified here
|
# MCU Series is defined by the HAL package and doesn't need to be specified here
|
||||||
C_DEFS = -D$(MCU_PACKAGE) -DUSE_HAL_DRIVER -DUSE_FULL_LL_DRIVER -D$(MCU_VARIANT)
|
C_DEFS = -D$(MCU_PACKAGE) -DUSE_HAL_DRIVER -DUSE_FULL_LL_DRIVER -D$(MCU_VARIANT)
|
||||||
|
|
||||||
|
@ -20,3 +20,5 @@ LD_FILE = boards/STM32F401xd_fs.ld
|
|||||||
# lto for this port, and if other stuff hasn't been added in the
|
# lto for this port, and if other stuff hasn't been added in the
|
||||||
# meantime
|
# meantime
|
||||||
CIRCUITPY_ULAB = 0
|
CIRCUITPY_ULAB = 0
|
||||||
|
|
||||||
|
SUPEROPT_GC = 0
|
||||||
|
2
py/py.mk
2
py/py.mk
@ -19,7 +19,7 @@ endif
|
|||||||
QSTR_GLOBAL_DEPENDENCIES += $(PY_SRC)/mpconfig.h mpconfigport.h
|
QSTR_GLOBAL_DEPENDENCIES += $(PY_SRC)/mpconfig.h mpconfigport.h
|
||||||
|
|
||||||
# some code is performance bottleneck and compiled with other optimization options
|
# some code is performance bottleneck and compiled with other optimization options
|
||||||
_CSUPEROPT = -O3
|
CSUPEROPT = -O3
|
||||||
|
|
||||||
# this sets the config file for FatFs
|
# this sets the config file for FatFs
|
||||||
CFLAGS_MOD += -DFFCONF_H=\"lib/oofatfs/ffconf.h\"
|
CFLAGS_MOD += -DFFCONF_H=\"lib/oofatfs/ffconf.h\"
|
||||||
|
@ -38,7 +38,6 @@
|
|||||||
//| RGB565: ImageFormat
|
//| RGB565: ImageFormat
|
||||||
//| """RGB565 format."""
|
//| """RGB565 format."""
|
||||||
//|
|
//|
|
||||||
const mp_obj_type_t camera_imageformat_type;
|
|
||||||
|
|
||||||
const camera_imageformat_obj_t camera_imageformat_jpg_obj = {
|
const camera_imageformat_obj_t camera_imageformat_jpg_obj = {
|
||||||
{ &camera_imageformat_type },
|
{ &camera_imageformat_type },
|
||||||
|
@ -35,7 +35,7 @@ typedef enum {
|
|||||||
IMAGEFORMAT_RGB565,
|
IMAGEFORMAT_RGB565,
|
||||||
} camera_imageformat_t;
|
} camera_imageformat_t;
|
||||||
|
|
||||||
const mp_obj_type_t camera_imageformat_type;
|
extern const mp_obj_type_t camera_imageformat_type;
|
||||||
|
|
||||||
camera_imageformat_t camera_imageformat_obj_to_type(mp_obj_t obj);
|
camera_imageformat_t camera_imageformat_obj_to_type(mp_obj_t obj);
|
||||||
mp_obj_t camera_imageformat_type_to_obj(camera_imageformat_t mode);
|
mp_obj_t camera_imageformat_type_to_obj(camera_imageformat_t mode);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user