Skip to content

Commit aff4410

Browse files
committed
Added BITS_PER_BYTE constant
1 parent db90f78 commit aff4410

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/generate.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ use syn;
99
use syn::{Ident, Lit};
1010

1111
use errors::*;
12-
use util::{self, ToSanitizedSnakeCase, ToSanitizedUpperCase, U32Ext};
12+
use util::{self, ToSanitizedSnakeCase, ToSanitizedUpperCase, U32Ext, BITS_PER_BYTE};
1313
use Target;
1414

1515
/// Whole device generation

src/util.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ use syn::{Ident, IntTy, Lit};
99

1010
use errors::*;
1111

12+
pub const BITS_PER_BYTE: u32 = 8;
13+
1214
/// List of chars that some vendors use in their peripheral/field names but
1315
/// that are not valid in Rust ident
1416
const BLACKLIST_CHARS: &'static [char] = &['(', ')', '[', ']'];

0 commit comments

Comments
 (0)