Update .clang-format for LLVM 14.0, available on Ubuntu 22.04. There is still plenty that clang-format sucks at or does wrong, so either add some more blocks to disable it, or just put up with it. Signed-off-by: Tim Crawford <tcrawford@system76.com>
13 lines
220 B
C
13 lines
220 B
C
// SPDX-License-Identifier: GPL-3.0-only
|
|
|
|
#include <avr/io.h>
|
|
|
|
#include <board/cpu.h>
|
|
#include <board/i2c.h>
|
|
|
|
void i2c_init(uint32_t baud) {
|
|
TWAR = 0;
|
|
TWBR = (uint8_t)(((F_CPU / baud) - 16) / 2);
|
|
TWCR = 0;
|
|
}
|