BgApiDriver.BgApi.ble_cmd_hardware_timer_comparator C# (CSharp) Méthode

ble_cmd_hardware_timer_comparator() public méthode

public ble_cmd_hardware_timer_comparator ( int timer, int channel, int mode, int comparator_value ) : ble_msg_hardware_timer_comparator_rsp_t
timer int
channel int
mode int
comparator_value int
Résultat ble_msg_hardware_timer_comparator_rsp_t
        public ble_msg_hardware_timer_comparator_rsp_t ble_cmd_hardware_timer_comparator(int timer, int channel, int mode, int comparator_value)
        {
            log("ble_cmd_hardware_timer_comparator_id");
            byte[] _data = new byte[SIZE_HEADER + 0 + 1 + 1 + 1 + 2];
            int idx = 0;
            // header
            _data[idx++] = (byte)ble_dev_types.ble_dev_type_ble|(byte)ble_msg_types.ble_msg_type_cmd|0x0;
            _data[idx++] = (byte)(0 + 1 + 1 + 1 + 2);
            _data[idx++] = (byte)ble_classes.ble_cls_hardware;
            _data[idx++] = (byte)ble_command_ids.ble_cmd_hardware_timer_comparator_id;
            // data
            _data[idx++] = (byte)timer;
            _data[idx++] = (byte)channel;
            _data[idx++] = (byte)mode;
            _data[idx++] = (byte)comparator_value;
            _data[idx++] = (byte)(comparator_value >> 8);
            // send
            BgApiResponse response = Send(new BgApiCommand() { Data = _data }, false);
            return (ble_msg_hardware_timer_comparator_rsp_t)response;
        }
BgApi