Skip to content

Commit

Permalink
Merge pull request #1 from tkeksa/upd
Browse files Browse the repository at this point in the history
Update list of boards and dependencies
  • Loading branch information
tkeksa committed Oct 11, 2023
2 parents 85e29f2 + 6f512d2 commit 4cb1837
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 25 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@

# IntelliJ IDEA module files
*.iml
/.idea
32 changes: 16 additions & 16 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
[package]
name = "oxi"
version = "0.2.1"
version = "0.2.2"
authors = ["Tomas Kukosa <tkeksa@gmail.com>"]
edition = "2021"

[dependencies]
bytes = "1.1.0"
bytes = "1.5.0"
getopts = "0.2.21"
hexplay = "0.2.1"
hexplay = "0.3.0"
lazy_static = "1.4.0"
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
- [OLinuXino U-Boot boards.c file with list of boards][OLINUXINO-UBOOT-BOARDS]

##### Generate list of board IDs from OLinuXino U-Boot boards.c file
`wget -qO- https://raw.githubusercontent.com/OLIMEX/u-boot-olinuxino/release-20211130/board/olimex/common/boards.c | perl extract_board_ids.pl > boards.rs`
`wget -qO- https://raw.githubusercontent.com/OLIMEX/u-boot-olinuxino/release-20230515/board/olimex/common/boards.c | perl extract_board_ids.pl > boards.rs`

## License
- MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT)
Expand All @@ -24,4 +24,4 @@
[license-link]: http://opensource.org/licenses/MIT
[OLINUXINO]: https://github.com/OLIMEX/OLINUXINO
[OLIMEX-A20-EEPROM]: https://github.com/OLIMEX/OLINUXINO/blob/master/SOFTWARE/A20/A20-eeprom-contents/Olimex-A20-EEPROM-October-2019.pdf
[OLINUXINO-UBOOT-BOARDS]: https://github.com/OLIMEX/u-boot-olinuxino/blob/release-20211130/board/olimex/common/boards.c
[OLINUXINO-UBOOT-BOARDS]: https://github.com/OLIMEX/u-boot-olinuxino/blob/release-20230515/board/olimex/common/boards.c
8 changes: 4 additions & 4 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -118,17 +118,17 @@ fn parse_buf(buf: &[u8]) {
println!("MAC : {}", mac);
}

fn main() -> Result<(), std::io::Error> {
fn main() -> Result<(), io::Error> {
let args = env::args().skip(1).collect::<Vec<_>>();

let mut opts = Options::new();
opts.optopt("i", "i2c", "Number of the I2C bus", "I2CBUS");
opts.optflag("x", "hex", "Hexadecimal dump");
opts.optflag("h", "help", "Help");
let matches = match opts.parse(&args) {
let matches = match opts.parse(args) {
Ok(m) => m,
Err(f) => {
eprintln!("{}", f.to_string());
eprintln!("{}", f);
usage(&opts);
std::process::exit(1);
}
Expand All @@ -148,7 +148,7 @@ fn main() -> Result<(), std::io::Error> {
// find EEPROM
let devs = find_i2c_devs();
let eeproms = find_eeproms(&devs);
if let Some(&i) = eeproms.get(0) {
if let Some(&i) = eeproms.first() {
i
} else {
eprintln!("EEPROM not found");
Expand Down

0 comments on commit 4cb1837

Please sign in to comment.