int I2C_Master_ReadReg(unsigned char dev_addr, unsigned char reg_addr, unsigned char count, unsigned char *pData, void (* Sub)(void)) {
uint8_t cnt;
start();
sda(dev_addr);
if (!(dev_addr == 0x10)) {
cnt = 0;
}
if (count > 0x05) {
cnt = 0;
}
if (clk() == 1) {
I2C_Ack_Error(1);
return -1;
}
sda(reg_addr + 0);
if (clk() == 1) {
I2C_Ack_Error(2);
return -2;
}
start();
sda(dev_addr + 1);
if (clk() == 1) {
I2C_Ack_Error(3);
return -3;
}
for (cnt = 0; cnt < count; ++cnt) {
*(pData + cnt) = read();
//printf("D: %x\n\r", read());
if (clk() == 0) {
I2C_Ack_Error(4);
return -4;
}
stop();
}
return 0;
}
How to setup stop condition on VEML7700 through I2C library? I am not getting the ACK from reading
111 Views Asked by NoUdemy At
0
There are 0 best solutions below
Related Questions in C
- How to call a C language function from x86 assembly code?
- What does: "char *argv[]" mean?
- User input sanitization program, which takes a specific amount of arguments and passes the execution to a bash script
- How to crop a BMP image in half using C
- How can I get the difference in minutes between two dates and hours?
- Why will this code compile although it defines two variables with the same name?
- Compiling eBPF program in Docker fails due to missing '__u64' type
- Why can't I use the file pointer after the first read attempt fails?
- #include Header files in C with definition too
- OpenCV2 on CLion
- What is causing the store latency in this program?
- How to refer to the filepath of test data in test sourcecode?
- 9 Digit Addresses in Hexadecimal System in MacOS
- My server TCP doesn't receive messages from the client in C
- Printing the characters obtained from the array s using printf?
Related Questions in I2C
- Adafruit BNO08x Lib Not working with PicoRP2040 - PlatformIO
- msp430f5438a reading multiple sensor tmp117
- Raspberry pi 4, ina219 Bi-Directional DC Current Power Supply Sensor
- read block data with smbus2 is slow on Raspberry Pi
- I2C problems communicating with I2C Analog Devices AD5112 Digital Pot
- How to receive a float array using esp8266 via I2c
- I2C Communication with Tiva TM4C123GXL
- GPIO I2C IMU on OrangePi CM4 Running Android Doesn't Interface With Native Apps
- I2C LCD1602 interfacing with PIC16F877A
- Sets huskylens modes
- Find out which protocol to communicate with a TFT LCD display
- Why does one of the arguments in this MPU-6050 code mean something different from the official Arduino documentation?
- I want to change the slave address in runtime again after the first configuration of i2c SLAVE. Is this possible , I'm getting errors while doing that
- Issue with MAX32664 breakout board from Protocentral on STM32L476RG Nucleo-64: Fixed SpO2 value
- enabling cdc-acm uart and I2C at the same time on zephyr OS
Related Questions in TRAFFIC
- Gurobi unable to find the most optimal Link Utilization
- Heatmap using latitude and longitude coordinates
- SUMO Traffic Simulator - Find neighbouring traffic lights
- HTB overlimits traffic BW
- Sorting out the API traffic in Jmeter
- How can I solve a multi-class traffic assignment
- Can nRF sniffer for BLE capture Packets in the connection sent between the two devices in the connection?
- TomTom traffic api integration in ESRI js api
- Traffic light sumo simulation
- Do github traffic insights include visits to the raw versions of files?
- jmeter SampleResult.setSuccessful(false) not working
- API for live traffic information in the form of JSON or Text or other formate
- How to filter traffic by Client IP with istio on GKE
- Traffic Manager and CNAME
- Connection pool in Istio
Related Questions in ACK
- Vim with Ack and "Silver searcher" - can not open file from result panel
- Preserve colors in piped ack-grep
- TCP Sockets in C: Does the recv() function trigger sending the ACK?
- ack: given multiple strings, print which one wasn't found
- How to setup stop condition on VEML7700 through I2C library? I am not getting the ACK from reading
- Slack Bolt await ack() - asynchronous
- Ag / Grep Exact Match Only Search
- Is there a way to set ignore case in .ackrc file
- ack: Escape single quotes while providing regex
- Wireshark - TCP SYN, SYN ACK and acknowledgement number from server
- What's confusing both grep and ack?
- Locate Ack in Emacs on Windows
- How can I modify a type in ack?
- awk command inside for loop to read and write multiple files
- Dont send ACK after server response
Related Questions in MCU
- Failing write/read on RH850 with NOR flash
- Comparing analog signal from Electret mic with samples
- No tinyusb CDC's callback is called
- Interrupt not working - Controlling PWM using DMA with STM32 MCU
- cJSON_Parse() causing parse error for JSON files with more than 50 lines on Renesas MCU with NextX module
- Solution prevents people who do not have a key from downloading firmware to the MCU
- Is it possible to implement dynamic webpage using RAW API of LwIP (Light weight IP).?
- UART Transmissions from MSPM0G3507 not working when connect to STM32G474, but working when have Jlink connected in parallel
- internal registers, difference between temporary and argument-registers
- struggling with evaluationboard "WCH32v307v R1 1v0" right at the start
- Assembly Language for MCU 8051 IDE with AT89S52 microcontroller
- Not Getting Any Output to Port Nucleo-64
- ESP32 Microcontroller ADC conversion problems
- Detecting SCL/SDA ports
- How can I use STM32 sleep mode with UART
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular # Hahtags
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?