|
39 | 39 | * DAMAGE. |
40 | 40 | ******************************************************************************/ |
41 | 41 |
|
42 | | -/******************************************************************************/ |
43 | | -/***************************** Include Files **********************************/ |
44 | | -/******************************************************************************/ |
45 | 42 | #include "ad5710r.h" |
46 | 43 | #include <stdlib.h> |
47 | 44 | #include <string.h> |
|
52 | 49 | #include "no_os_spi.h" |
53 | 50 | #include "no_os_util.h" |
54 | 51 |
|
55 | | -/******************************************************************************/ |
56 | | -/********************** Macros and Constants Definitions **********************/ |
57 | | -/******************************************************************************/ |
58 | 52 | #define AD5710R_DATA_INDEX(x) x ? 1 : 2 |
59 | 53 | #define AD5710R_INSTR_LEN(x) AD5710R_DATA_INDEX(x) |
60 | 54 | #define AD5710R_ADDR_INDEX(x) x ? 0 : 1 |
61 | 55 | #define AD5710R_BUFF_LEN(x) x ? 2 : 3 |
62 | 56 | #define AD5710R_CRC_BUFF_LEN(x) x ? 3 : 4 |
63 | 57 | #define AD5710R_CRC_INDEX(x) AD5710R_ADDR_INDEX(x) + 2 |
64 | 58 |
|
65 | | -/******************************************************************************/ |
66 | | -/************************ Variable Declarations *******************************/ |
67 | | -/******************************************************************************/ |
68 | 59 | static struct ad5710r_transfer_config multi_cfg = { |
69 | 60 | .single_instr = 0, /* Sets the streaming mode. */ |
70 | 61 | .stream_length_keep_value = 1 /* Prevents the stream length value from |
71 | 62 | automatically resetting to zero. */ |
72 | 63 | }; |
73 | 64 |
|
74 | | -/******************************************************************************/ |
75 | | -/************************ Functions Definitions *******************************/ |
76 | | -/******************************************************************************/ |
77 | | -/******************************************************************************/ |
78 | | - |
79 | 65 | /** |
80 | 66 | * @brief Updates the interface configuration. |
81 | 67 | * @param desc - The device structure. |
|
0 commit comments