Добавлены библиотеки ZD24C02A

This commit is contained in:
Eugene 2023-09-08 14:17:58 +03:00
parent 2a4d4cfce3
commit 49d32751ef
3 changed files with 25 additions and 4 deletions

View File

@ -0,0 +1,8 @@
/*
* ZD24C02A.c
*
* Created on: 8 ñåíò. 2023 ã.
* Author: seklyuts
*/

View File

@ -0,0 +1,13 @@
/*
* ZD24C02A.h
*
* Created on: 8 ńĺíň. 2023 ă.
* Author: seklyuts
*/
#ifndef SRC_ZD24C02A_H_
#define SRC_ZD24C02A_H_
#endif /* SRC_ZD24C02A_H_ */

View File

@ -21,17 +21,17 @@ uint16_t I2C_RXdata[MAX_BUFFER_SIZE];
// //
// I2C GPIO pins // I2C GPIO pins
// //
#define GPIO_PIN_SDAA 26U // GPIO number for I2C SDAA #define GPIO_PIN_SDAA 0U // GPIO number for I2C SDAA
#define GPIO_PIN_SCLA 27U // GPIO number for I2C SCLA #define GPIO_PIN_SCLA 1U // GPIO number for I2C SCLA
void I2CMasterGpioInit(void) void I2CMasterGpioInit(void)
{ {
// //
//Configure I2C pins //Configure I2C pins
// //
GPIO_SetupPinMux(GPIO_PIN_SDAA, GPIO_MUX_CPU1, 11); GPIO_SetupPinMux(GPIO_PIN_SDAA, GPIO_MUX_CPU1, 6);
GPIO_SetupPinOptions(GPIO_PIN_SDAA, GPIO_OUTPUT, GPIO_PULLUP); GPIO_SetupPinOptions(GPIO_PIN_SDAA, GPIO_OUTPUT, GPIO_PULLUP);
GPIO_SetupPinMux(GPIO_PIN_SCLA, GPIO_MUX_CPU1, 11); GPIO_SetupPinMux(GPIO_PIN_SCLA, GPIO_MUX_CPU1, 6);
GPIO_SetupPinOptions(GPIO_PIN_SCLA, GPIO_OUTPUT, GPIO_PULLUP); GPIO_SetupPinOptions(GPIO_PIN_SCLA, GPIO_OUTPUT, GPIO_PULLUP);
} }