-
Notifications
You must be signed in to change notification settings - Fork 335
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #967 from riscv/from_upstream
Merge up to 4b1ea85 from upstream
- Loading branch information
Showing
98 changed files
with
3,186 additions
and
480 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
/* SPDX-License-Identifier: GPL-2.0-or-later */ | ||
/**************************************************************************** | ||
File : i2c.h * | ||
Contents : i2c bit-bang library * | ||
Copyright 2023, Ahmed Errached BOUDJELIDA, NanoXplore SAS. * | ||
<[email protected]> * | ||
<[email protected]> * | ||
*****************************************************************************/ | ||
|
||
#ifndef __I2C_H | ||
#define __I2C_H | ||
|
||
#include <stdbool.h> | ||
#include <stdint.h> | ||
#include <stdio.h> | ||
|
||
void start_cd(void); | ||
void repeated_start(void); | ||
void stop_cd(void); | ||
void clock_cd(void); | ||
void send_ack(void); | ||
bool get_ack(void); | ||
|
||
uint8_t get_address(uint8_t adr, uint8_t rdwr); | ||
|
||
void send_byte(uint8_t input); | ||
uint8_t receive_byte(void); | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.