Skip to content

Commit 38550c2

Browse files
authored
Merge pull request #201 from dfrankland/master
Expose internals to lib
2 parents b946608 + 9314804 commit 38550c2

File tree

3 files changed

+28
-8
lines changed

3 files changed

+28
-8
lines changed

src/lib.rs

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -410,6 +410,25 @@
410410
411411
// NOTE This file is for documentation only
412412

413+
#![recursion_limit = "128"]
414+
415+
extern crate cast;
416+
extern crate either;
417+
#[macro_use]
418+
extern crate error_chain;
419+
extern crate inflections;
420+
#[macro_use]
421+
pub extern crate quote;
422+
pub extern crate svd_parser as svd;
423+
extern crate syn;
424+
425+
mod errors;
426+
pub mod generate;
427+
mod util;
428+
pub mod target;
429+
430+
use target::Target;
431+
413432
/// Assigns a handler to an interrupt
414433
///
415434
/// This macro takes two arguments: the name of an interrupt and the path to the

src/main.rs

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,21 +14,15 @@ extern crate syn;
1414
mod errors;
1515
mod generate;
1616
mod util;
17+
mod target;
1718

1819
use std::fs::File;
1920
use std::{io, process};
2021

2122
use clap::{App, Arg};
2223

2324
use errors::*;
24-
25-
#[derive(Clone, Copy, PartialEq)]
26-
pub enum Target {
27-
CortexM,
28-
Msp430,
29-
RISCV,
30-
None,
31-
}
25+
use target::Target;
3226

3327
impl Target {
3428
fn parse(s: &str) -> Result<Self> {

src/target.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#[derive(Clone, Copy, PartialEq)]
2+
pub enum Target {
3+
CortexM,
4+
Msp430,
5+
RISCV,
6+
None,
7+
}

0 commit comments

Comments
 (0)