gonzui


Format: Advanced Search

mtkernel_3/device/i2c/sysdepend/stm32l4/i2c_cnf_stm32l4.hbare sourcepermlink (0.01 seconds)

Search this content:

    1: /*
    2:  *----------------------------------------------------------------------
    3:  *    Device Driver for micro T-Kernel for μT-Kernel 3.00.03
    4:  *
    5:  *    Copyright (C) 2020-2021 by Ken Sakamura.
    6:  *    This software is distributed under the T-License 2.2.
    7:  *----------------------------------------------------------------------
    8:  *
    9:  *    Released by TRON Forum(http://www.tron.org) at 2021/03/31.
   10:  *
   11:  *----------------------------------------------------------------------
   12:  */
   13: 
   14: 
   15: /*
   16:  *      i2c_cnf_stm32l4.h 
   17:  *      I2C device configuration file
   18:  *              for STM32L4
   19:  */
   20: #ifndef __DEV_I2C_CNF_STM32L4_H__
   21: #define __DEV_I2C_CNF_STM32L4_H__
   22: 
   23: /* Device initialization */
   24: #define DEVCONF_I2C_INIT_MCLK   TRUE              // Initialize module clock
   25: 
   26: /* ADC Clock (I2C) */
   27: #define DEVCNF_I2CSEL           0                // I2C clock source
   28: 
   29: /* Register initial value */
   30: #define I2C_TIMINGR_INIT                0x10909CEC    // Standard mode, 100KHz
   31: //#define       I2C_TIMINGR_INIT      0x00702991   // Fast mode, 400KHz
   32: 
   33: // Interrupt priority
   34: #define DEVCNF_I2C1_INTPRI      5
   35: #define DEVCNF_I2C2_INTPRI      5
   36: #define DEVCNF_I2C3_INTPRI      5
   37: 
   38: /* Communication timeout time */
   39: #define DEVCNF_I2C1_TMO         1000
   40: #define DEVCNF_I2C2_TMO         1000
   41: #define DEVCNF_I2C3_TMO         1000
   42: 
   43: 
   44: #endif          /* __DEV_I2C_CNF_STM32L4_H__ */