Home
last modified time | relevance | path

Searched refs:fcs (Results 1 – 16 of 16) sorted by relevance

/Zephyr-Core-3.5.0/tests/unit/crc/
Dmain.c186 uint8_t fcs, expected; in ZTEST() local
195 fcs = crc8(test0, sizeof(test0), 0x00, 0x00, false); in ZTEST()
197 zassert_equal(fcs, expected, "0x%02x vs 0x%02x", fcs, expected); in ZTEST()
199 fcs = crc8(test0, sizeof(test0), 0x31, 0x00, false); in ZTEST()
201 zassert_equal(fcs, expected, "0x%02x vs 0x%02x", fcs, expected); in ZTEST()
203 fcs = crc8(test1, sizeof(test1), 0x07, 0x00, false); in ZTEST()
205 zassert_equal(fcs, expected, "0x%02x vs 0x%02x", fcs, expected); in ZTEST()
207 fcs = crc8(test1, sizeof(test1), 0x31, 0xff, false); in ZTEST()
209 zassert_equal(fcs, expected, "0x%02x vs 0x%02x", fcs, expected); in ZTEST()
211 fcs = crc8(test1, sizeof(test1), 0x07, 0x00, false); in ZTEST()
[all …]
/Zephyr-Core-3.5.0/subsys/bluetooth/host/
Drfcomm.c108 uint8_t fcs = 0xff; in rfcomm_calc_fcs() local
111 fcs = rfcomm_crc_table[fcs ^ *data++]; in rfcomm_calc_fcs()
115 return (0xff - fcs); in rfcomm_calc_fcs()
121 uint8_t fcs = 0xff; in rfcomm_check_fcs() local
124 fcs = rfcomm_crc_table[fcs ^ *data++]; in rfcomm_check_fcs()
128 fcs = rfcomm_crc_table[fcs ^ recvd_fcs]; in rfcomm_check_fcs()
131 return (fcs == 0xcf); in rfcomm_check_fcs()
331 uint8_t cr, fcs; in rfcomm_send_sabm() local
341 fcs = rfcomm_calc_fcs(BT_RFCOMM_FCS_LEN_NON_UIH, buf->data); in rfcomm_send_sabm()
342 net_buf_add_u8(buf, fcs); in rfcomm_send_sabm()
[all …]
/Zephyr-Core-3.5.0/tests/net/ppp/driver/src/
Dmain.c268 static bool check_fcs(struct net_pkt *pkt, uint16_t *fcs) in check_fcs() argument
287 *fcs = crc; in check_fcs()
319 uint16_t fcs = 0; in ppp_verify_fcs() local
348 ret = check_fcs(pkt, &fcs); in ppp_verify_fcs()
350 0xf0b8, fcs); in ppp_verify_fcs()
360 static bool calc_fcs(struct net_pkt *pkt, uint16_t *fcs) in calc_fcs() argument
381 *fcs = crc; in calc_fcs()
390 uint16_t pkt_fcs, fcs = 0; in ppp_calc_fcs() local
425 ret = calc_fcs(pkt, &fcs); in ppp_calc_fcs()
428 zassert_equal(pkt_fcs, fcs, "FCS calc failed, expecting 0x%x got 0x%x", in ppp_calc_fcs()
[all …]
/Zephyr-Core-3.5.0/subsys/modem/
Dmodem_cmux.c144 uint8_t fcs; in modem_cmux_transmit_frame() local
157 fcs = crc8(&byte, 1, MODEM_CMUX_FCS_POLYNOMIAL, MODEM_CMUX_FCS_INIT_VALUE, true); in modem_cmux_transmit_frame()
162 fcs = crc8(&byte, 1, MODEM_CMUX_FCS_POLYNOMIAL, fcs, true); in modem_cmux_transmit_frame()
168 fcs = crc8(&byte, 1, MODEM_CMUX_FCS_POLYNOMIAL, fcs, true); in modem_cmux_transmit_frame()
179 fcs = 0xFF - crc8(&byte, 1, MODEM_CMUX_FCS_POLYNOMIAL, fcs, true); in modem_cmux_transmit_frame()
181 fcs = crc8(&byte, 1, MODEM_CMUX_FCS_POLYNOMIAL, fcs, true); in modem_cmux_transmit_frame()
182 fcs = 0xFF - crc8(frame->data, data_len, MODEM_CMUX_FCS_POLYNOMIAL, fcs, true); in modem_cmux_transmit_frame()
189 ring_buf_put(&cmux->transmit_rb, &fcs, 1); in modem_cmux_transmit_frame()
472 uint8_t fcs; in modem_cmux_process_received_byte() local
617 fcs = 0xFF - crc8(cmux->frame_header, cmux->frame_header_len, in modem_cmux_process_received_byte()
[all …]
Dmodem_ppp.c27 static uint16_t modem_ppp_fcs_update(uint16_t fcs, uint8_t byte) in modem_ppp_fcs_update() argument
29 return crc16_ccitt(fcs, &byte, 1); in modem_ppp_fcs_update()
32 static uint16_t modem_ppp_fcs_final(uint16_t fcs) in modem_ppp_fcs_final() argument
34 return fcs ^ 0xFFFF; in modem_ppp_fcs_final()
/Zephyr-Core-3.5.0/drivers/console/
Dgsm_mux.c103 uint8_t fcs; /* calculated frame check sequence */ member
269 static uint8_t gsm_mux_fcs_add_buf(uint8_t fcs, const uint8_t *buf, size_t len) in gsm_mux_fcs_add_buf() argument
271 return crc8(buf, len, FCS_POLYNOMIAL, fcs, true); in gsm_mux_fcs_add_buf()
274 static uint8_t gsm_mux_fcs_add(uint8_t fcs, uint8_t recv_byte) in gsm_mux_fcs_add() argument
276 return gsm_mux_fcs_add_buf(fcs, &recv_byte, 1); in gsm_mux_fcs_add()
1239 mux->fcs = FCS_INIT_VALUE; in gsm_mux_process_data()
1262 mux->fcs = gsm_mux_fcs_add(mux->fcs, recv_byte); in gsm_mux_process_data()
1271 mux->fcs = gsm_mux_fcs_add(mux->fcs, recv_byte); in gsm_mux_process_data()
1275 mux->fcs = gsm_mux_fcs_add(mux->fcs, recv_byte); in gsm_mux_process_data()
1295 mux->fcs = gsm_mux_fcs_add(mux->fcs, recv_byte); in gsm_mux_process_data()
[all …]
/Zephyr-Core-3.5.0/tests/subsys/modem/modem_ppp/src/
Dmain.c211 uint16_t fcs; in test_modem_ppp_generate_ppp_frame() local
216 fcs = crc16_ccitt(0xFFFF, &byte, 0x01); in test_modem_ppp_generate_ppp_frame()
226 fcs = crc16_ccitt(fcs, frame, size) ^ 0xFFFF; in test_modem_ppp_generate_ppp_frame()
228 frame[size - 2] = fcs >> 8; in test_modem_ppp_generate_ppp_frame()
229 frame[size - 1] = fcs; in test_modem_ppp_generate_ppp_frame()
/Zephyr-Core-3.5.0/subsys/bluetooth/mesh/
Dcrypto.c548 uint8_t fcs = 0xff; in bt_mesh_fcs_calc() local
551 fcs = crc_table[fcs ^ *data++]; in bt_mesh_fcs_calc()
554 LOG_DBG("fcs 0x%02x", 0xff - fcs); in bt_mesh_fcs_calc()
556 return 0xff - fcs; in bt_mesh_fcs_calc()
563 uint8_t fcs = 0xff; in bt_mesh_fcs_check() local
566 fcs = crc_table[fcs ^ *data++]; in bt_mesh_fcs_check()
569 return crc_table[fcs ^ received_fcs] == 0xcf; in bt_mesh_fcs_check()
Dpb_adv.c87 uint8_t fcs; /* Expected FCS value */ member
287 if (!bt_mesh_fcs_check(link.rx.buf, link.rx.fcs)) { in prov_msg_recv()
470 link.rx.fcs = net_buf_simple_pull_u8(buf); in gen_prov_start()
473 link.rx.buf->len, link.rx.fcs); in gen_prov_start()
/Zephyr-Core-3.5.0/drivers/adc/
Dadc_rpi_pico.c74 hw_set_bits(&adc_hw->fcs, ADC_FCS_OVER_BITS); in adc_clear_errors()
75 hw_set_bits(&adc_hw->fcs, ADC_FCS_UNDER_BITS); in adc_clear_errors()
76 hw_set_bits(&adc_hw->fcs, ADC_FCS_ERR_BITS); in adc_clear_errors()
/Zephyr-Core-3.5.0/dts/arm/xilinx/
Dzynqmp.dtsi122 discard-rx-fcs;
149 discard-rx-fcs;
176 discard-rx-fcs;
203 discard-rx-fcs;
Dzynq7000.dtsi73 discard-rx-fcs;
100 discard-rx-fcs;
/Zephyr-Core-3.5.0/drivers/net/
Dppp.c678 static bool calc_fcs(struct net_pkt *pkt, uint16_t *fcs, uint16_t protocol) in calc_fcs() argument
705 *fcs = crc; in calc_fcs()
728 uint16_t fcs, escaped; in ppp_send() local
756 if (!calc_fcs(pkt, &fcs, protocol)) { in ppp_send()
799 escaped = htons(ppp_escape_byte(fcs, &offset)); in ppp_send()
804 escaped = htons(ppp_escape_byte(fcs >> 8, &offset)); in ppp_send()
/Zephyr-Core-3.5.0/tests/drivers/build_all/gpio/
Dapp.overlay99 compatible = "fcs,fxl6408";
/Zephyr-Core-3.5.0/dts/bindings/
Dvendor-prefixes.txt212 fcs Fairchild Semiconductor
/Zephyr-Core-3.5.0/doc/releases/
Drelease-notes-2.7.rst846 :dtcompatible:`fcs,fxl6408`, :dtcompatible:`ilitek,ili9341`,