diff options
author | Vegard Storheil Eriksen <zyp@jvnv.net> | 2022-04-16 20:44:24 +0200 |
---|---|---|
committer | Vegard Storheil Eriksen <zyp@jvnv.net> | 2022-04-16 21:01:57 +0200 |
commit | 4ba824dab86433bb5295878f2380a9bd9536d67e (patch) | |
tree | 0b8a25c8c65b350f2e2266c9992a385c0ec9c681 /i2c/SConscript | |
parent | 32df2ae55601f1ad135247ad79a913514d018032 (diff) |
i2c: stm32: Add v2 support.
Diffstat (limited to 'i2c/SConscript')
-rw-r--r-- | i2c/SConscript | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/i2c/SConscript b/i2c/SConscript new file mode 100644 index 0000000..c639898 --- /dev/null +++ b/i2c/SConscript @@ -0,0 +1,21 @@ +Import('env') + +headers = [] +instances = [] +sources = [] +aliases = {} + +periph = env['PLATFORM_SPEC'].get('periph', {}) + +if 'stm32_i2c' in periph: + headers.append('stm32_i2c.h') + for name, data in periph['stm32_i2c'].items(): + instances.append({ + 'type': 'STM32_I2C_t<STM32_I2C_reg_%s_t>' % data['type'], + 'name': name, + 'args': [data['offset']], + }) + +env.Jinja2('i2c.h', '../templates/periph_instances.h.j2', headers = headers, instances = instances, aliases = aliases) + +Return('sources') |