Home
last modified time | relevance | path

Searched full:fcs (Results 1 – 25 of 57) sorted by relevance

123

/Zephyr-latest/tests/unit/crc/
Dmain.c137 /* Example capture including FCS from in ZTEST()
138 * https://www.horo.ch/techno/ppp-fcs/examples_en.html in ZTEST()
217 uint8_t fcs, expected; in ZTEST() local
226 fcs = crc8(test0, sizeof(test0), 0x00, 0x00, false); in ZTEST()
228 zassert_equal(fcs, expected, "0x%02x vs 0x%02x", fcs, expected); in ZTEST()
230 fcs = crc8(test0, sizeof(test0), 0x31, 0x00, false); in ZTEST()
232 zassert_equal(fcs, expected, "0x%02x vs 0x%02x", fcs, expected); in ZTEST()
234 fcs = crc8(test1, sizeof(test1), 0x07, 0x00, false); in ZTEST()
236 zassert_equal(fcs, expected, "0x%02x vs 0x%02x", fcs, expected); in ZTEST()
238 fcs = crc8(test1, sizeof(test1), 0x31, 0xff, false); in ZTEST()
[all …]
/Zephyr-latest/subsys/bluetooth/host/classic/
Drfcomm.c107 uint8_t fcs = 0xff; in rfcomm_calc_fcs() local
110 fcs = rfcomm_crc_table[fcs ^ *data++]; in rfcomm_calc_fcs()
114 return (0xff - fcs); in rfcomm_calc_fcs()
120 uint8_t fcs = 0xff; in rfcomm_check_fcs() local
123 fcs = rfcomm_crc_table[fcs ^ *data++]; in rfcomm_check_fcs()
127 fcs = rfcomm_crc_table[fcs ^ recvd_fcs]; in rfcomm_check_fcs()
130 return (fcs == 0xcf); in rfcomm_check_fcs()
335 uint8_t cr, fcs; in rfcomm_send_sabm() local
345 fcs = rfcomm_calc_fcs(BT_RFCOMM_FCS_LEN_NON_UIH, buf->data); in rfcomm_send_sabm()
346 net_buf_add_u8(buf, fcs); in rfcomm_send_sabm()
[all …]
/Zephyr-latest/tests/net/ppp/driver/src/
Dmain.c57 /* then we should see this FCS checked PPP data */
87 /* There is FCS error in this packet */
268 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()
349 zassert_true(ret, "FCS calc failed, expecting 0x%x got 0x%x", 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()
[all …]
/Zephyr-latest/subsys/modem/
Dmodem_cmux.c270 uint8_t fcs; in modem_cmux_transmit_frame() local
297 /* Compute FCS for the header (exclude SOF) */ in modem_cmux_transmit_frame()
298 fcs = crc8_rohc(MODEM_CMUX_FCS_INIT_VALUE, &buf[1], (buf_idx - 1)); in modem_cmux_transmit_frame()
300 /* FCS final */ in modem_cmux_transmit_frame()
302 fcs = 0xFF - fcs; in modem_cmux_transmit_frame()
304 fcs = 0xFF - crc8_rohc(fcs, frame->data, data_len); in modem_cmux_transmit_frame()
313 /* FCS and EOF will be put on the same call */ in modem_cmux_transmit_frame()
314 buf[0] = fcs; in modem_cmux_transmit_frame()
729 uint8_t fcs; in modem_cmux_process_received_byte() local
756 /* Store header for FCS */ 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()
150 /* Writing FCS */ in modem_ppp_wrap_net_pkt_byte()
256 /* Remove FCS */ in modem_ppp_process_received_byte()
/Zephyr-latest/dts/bindings/ethernet/
Dxlnx,gem.yaml213 disable-reject-fcs-crc-errors:
216 Optional feature flag - Disable rejection of FCS/CRC errors.
217 When set, frames with FCS/CRC errors will not be rejected. FCS error
218 statistics will still be collected for frames with bad FCS and FCS
254 discard-rx-fcs:
257 Optional feature flag - Remove FCS of received frames.
Datmel,gmac-common.yaml32 Ethernet Frame [ 14 MAC HEADER | 1500 MTU | 4 FCS ] = 1518 bytes
/Zephyr-latest/dts/bindings/gpio/
Dfcs,fxl6408.yaml6 compatible: "fcs,fxl6408"
/Zephyr-latest/drivers/peci/
Dpeci_npcx.c189 * The read block FCS is stored at offset N. in peci_npcx_transfer()
192 LOG_DBG("Wr FCS:0x%02x|Rd FCS:0x%02x", reg->PECI_WR_FCS, reg->PECI_RD_FCS); in peci_npcx_transfer()
217 LOG_ERR("PECI Nego or Wr FCS(0x%02x) error", reg->PECI_WR_FCS); in peci_npcx_isr()
220 LOG_ERR("PECI Rd FCS(0x%02x) error", reg->PECI_WR_FCS); in peci_npcx_isr()
Dpeci_mchp_xec.c339 /* Get write block FCS just for debug */ in peci_xec_read()
341 LOG_DBG("TX FCS %x", tx_fcs); in peci_xec_read()
343 /* If a Ping is done, write Tx fcs to rx buffer*/ in peci_xec_read()
349 /* Get read block FCS, but don't count it */ in peci_xec_read()
394 * Also perform a read when PECI cmd is Ping to get Write FCS in peci_xec_transfer()
/Zephyr-latest/drivers/ieee802154/
DKconfig.nrf566 bool "Include FCS field in the overall packet length"
69 Some 802.15.4 L2 implementations expect that FCS length is included in
/Zephyr-latest/dts/arm/xilinx/
Dzynqmp.dtsi126 discard-rx-fcs;
153 discard-rx-fcs;
180 discard-rx-fcs;
207 discard-rx-fcs;
Dzynq7000.dtsi73 discard-rx-fcs;
100 discard-rx-fcs;
/Zephyr-latest/drivers/net/
Dppp.c535 * the FCS. The address field will not be passed in ppp_input_byte()
607 LOG_DBG("Invalid FCS (0x%x)", crc); in ppp_check_fcs()
634 * fcs check above. in ppp_process_msg()
659 * FCS fields (16-bit) as the PPP L2 layer does not need in ppp_process_msg()
674 /* Remove FCS bytes (2) */ in ppp_process_msg()
761 static bool calc_fcs(struct net_pkt *pkt, uint16_t *fcs, uint16_t protocol) in calc_fcs() argument
788 *fcs = crc; in calc_fcs()
811 uint16_t fcs, escaped; in ppp_send() local
839 if (!calc_fcs(pkt, &fcs, protocol)) { in ppp_send()
861 /* Note that we do not print the first four bytes and FCS bytes at the in ppp_send()
[all …]
/Zephyr-latest/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.c88 uint8_t fcs; /* Expected FCS value */ member
417 if (!bt_mesh_fcs_check(link.rx.buf, link.rx.fcs)) { in prov_msg_recv()
418 LOG_ERR("Incorrect FCS"); in prov_msg_recv()
606 link.rx.fcs = net_buf_simple_pull_u8(buf); in gen_prov_start()
608 LOG_DBG("len %u last_seg %u total_len %u fcs 0x%02x", buf->len, START_LAST_SEG(rx->gpc), in gen_prov_start()
609 link.rx.buf->len, link.rx.fcs); in gen_prov_start()
/Zephyr-latest/tests/subsys/modem/modem_ppp/src/
Dmain.c190 /* Remove FCS */ in test_modem_ppp_unwrap()
211 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()
517 /* FCS is removed from packet data */ in ZTEST()
/Zephyr-latest/drivers/ethernet/
Deth_stellaris.c167 /* Read the rest of words, minus the partial word and FCS byte. */ in eth_stellaris_rx_pkt()
177 /* Handle the last partial word and discard the 4 Byte FCS. */ in eth_stellaris_rx_pkt()
182 /* Discard the last FCS word. */ in eth_stellaris_rx_pkt()
Deth_sam_gmac_priv.h101 /** Receive frame length including FCS */
103 /** FCS status */
Deth_xlnx_gem_priv.h56 * [13] FCS status bit for FCS ignore mode
244 * [26] Disable rejection of frames with FCS errors
250 * [17] Discard FCS from received frames
/Zephyr-latest/drivers/adc/
Dadc_rpi_pico.c85 hw_set_bits(&adc_hw->fcs, ADC_FCS_OVER_BITS); in adc_clear_errors()
86 hw_set_bits(&adc_hw->fcs, ADC_FCS_UNDER_BITS); in adc_clear_errors()
87 hw_set_bits(&adc_hw->fcs, ADC_FCS_ERR_BITS); in adc_clear_errors()
/Zephyr-latest/include/zephyr/net/
Dieee802154.h116 * @note Currently only a 2 byte FCS is supported although some PHYs (e.g. SUN,
117 * TVWS, ...) optionally support a 4 byte FCS. Needs to be changed once those
138 /* TODO: Support flexible MTU and FCS lengths for IEEE 802.15.4-2015ff */
/Zephyr-latest/subsys/canbus/isotp/
DKconfig55 If enabled, SFs, FCs and the last CF must always have a DLC of 8 bytes
/Zephyr-latest/include/zephyr/modem/
Dppp.h66 /* Writing FCS */
/Zephyr-latest/samples/drivers/peci/src/
Dmain.c124 printk("R FCS %x\n", rx_fcs); in peci_get_temp()

123