GCC Code Coverage Report
Directory: ./ Exec Total Coverage
File: core/src/ux_utility_long_put.c Lines: 6 6 100.0 %
Date: 2026-03-06 18:57:10 Branches: 0 0 - %

Line Branch Exec Source
1
/***************************************************************************
2
 * Copyright (c) 2024 Microsoft Corporation
3
 * Copyright (c) 2026-present Eclipse ThreadX contributors
4
 *
5
 * This program and the accompanying materials are made available under the
6
 * terms of the MIT License which is available at
7
 * https://opensource.org/licenses/MIT.
8
 *
9
 * SPDX-License-Identifier: MIT
10
 **************************************************************************/
11
12
13
/**************************************************************************/
14
/**************************************************************************/
15
/**                                                                       */
16
/** USBX Component                                                        */
17
/**                                                                       */
18
/**   Utility                                                             */
19
/**                                                                       */
20
/**************************************************************************/
21
/**************************************************************************/
22
23
24
/* Include necessary system files.  */
25
26
#define UX_SOURCE_CODE
27
28
#include "ux_api.h"
29
30
31
/**************************************************************************/
32
/*                                                                        */
33
/*  FUNCTION                                               RELEASE        */
34
/*                                                                        */
35
/*    _ux_utility_long_put                                PORTABLE C      */
36
/*                                                           6.1          */
37
/*  AUTHOR                                                                */
38
/*                                                                        */
39
/*    Chaoqiong Xiao, Microsoft Corporation                               */
40
/*                                                                        */
41
/*  DESCRIPTION                                                           */
42
/*                                                                        */
43
/*    This function writes a 32-bit value.                                */
44
/*                                                                        */
45
/*  INPUT                                                                 */
46
/*                                                                        */
47
/*    address                               Destination address           */
48
/*    value                                 32-bit value                  */
49
/*                                                                        */
50
/*  OUTPUT                                                                */
51
/*                                                                        */
52
/*    None                                                                */
53
/*                                                                        */
54
/*  CALLS                                                                 */
55
/*                                                                        */
56
/*    None                                                                */
57
/*                                                                        */
58
/*  CALLED BY                                                             */
59
/*                                                                        */
60
/*    USBX Components                                                     */
61
/*                                                                        */
62
/**************************************************************************/
63
24388
VOID  _ux_utility_long_put(UCHAR * address, ULONG value)
64
{
65
66
    /* In order to make this function endian agnostic and memory alignment
67
       independent, we write a byte at a time from the address.  */
68
24388
    *address++ =  (UCHAR) (value & 0xff);
69
24388
    *address++ =  (UCHAR) ((value >> 8) & 0xff);
70
24388
    *address++ =  (UCHAR) ((value >> 16) & 0xff);
71
24388
    *address =    (UCHAR) ((value >> 24) & 0xff);
72
73
    /* Return to caller.  */
74
24388
    return;
75
}
76