mkasenberg commented on code in PR #1682: URL: https://github.com/apache/mynewt-nimble/pull/1682#discussion_r1505620214
########## nimble/host/include/host/ble_cs.h: ########## @@ -0,0 +1,352 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +#ifndef H_BLE_CS_ +#define H_BLE_CS_ +#include "syscfg/syscfg.h" + +struct ble_cs_rd_loc_supp_cap_rp { Review Comment: So is it OK to use a structure from hci_common.h in the CS public api? If this is fine, I would get rid of the other duplicate structures in this file and the functions would just translate the endianness of some fileds, like this: ```C int ble_cs_rd_loc_supp_cap(struct ble_hci_le_cs_rd_loc_supp_cap_rp *rp) { int rc; rc = ble_hs_hci_cmd_tx(BLE_HCI_OP(BLE_HCI_OGF_LE, BLE_HCI_OCF_LE_CS_RD_LOC_SUPP_CAP), NULL, 0, rp, sizeof(*rp)); rp->max_consecutive_procedures_supported = le16toh(rp->max_consecutive_procedures_supported); rp->optional_nadm_sounding_capability = le16toh(rp->optional_nadm_sounding_capability); rp->optional_nadm_random_capability = le16toh(rp->optional_nadm_random_capability); rp->optional_subfeatures_supported = le16toh(rp->optional_subfeatures_supported); rp->optional_t_ip1_times_supported = le16toh(rp->optional_t_ip1_times_supported); rp->optional_t_ip2_times_supported = le16toh(rp->optional_t_ip2_times_supported); rp->optional_t_fcs_times_supported = le16toh(rp->optional_t_fcs_times_supported); rp->optional_t_pm_times_supported = le16toh(rp->optional_t_pm_times_supported); return rc; } ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
