Skip to content

Commit 64cdbe2

Browse files
committed
Add 'pub' where necessary to build a binary with this crate.
1 parent ecccae0 commit 64cdbe2

File tree

4 files changed

+11
-11
lines changed

4 files changed

+11
-11
lines changed

src/action.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use matrix::Matrix;
22
use state::KeyState;
33

44
const MAX_PACKET_SIZE: usize = 6;
5-
struct USBBuffer {
5+
pub struct USBBuffer {
66
data: [u32; MAX_PACKET_SIZE],
77
count: usize,
88
}
@@ -20,11 +20,11 @@ impl USBBuffer {
2020
}
2121
}
2222

23-
trait Layout {
23+
pub trait Layout {
2424
fn process_action(&self, row: usize, col: usize, state: KeyState, buf: &mut USBBuffer);
2525
}
2626

27-
fn process_actions<SM: Matrix<KeyState>, L: Layout>(states: SM, layout: &L) -> USBBuffer {
27+
pub fn process_actions<SM: Matrix<KeyState>, L: Layout>(states: SM, layout: &L) -> USBBuffer {
2828
let mut buf = USBBuffer::new();
2929
for c in 0..states.get_num_columns() {
3030
for r in 0..states.get_num_rows() {

src/lib.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
#![cfg_attr(not(test), no_std)]
22

33
#[macro_use]
4-
mod matrix;
5-
mod matrix_config;
4+
pub mod matrix;
5+
pub mod matrix_config;
66
pub mod scan;
7-
mod state;
8-
mod action;
7+
pub mod state;
8+
pub mod action;

src/scan.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
use matrix::Matrix;
22
use matrix_config::MatrixConfig;
33

4-
trait InputPin {
4+
pub trait InputPin {
55
fn read_input(&self) -> u32;
66
}
77

8-
trait OutputPin {
8+
pub trait OutputPin {
99
fn set_low(&self);
1010
fn set_high(&self);
1111
}
1212

13-
fn single_scan<MC: MatrixConfig, RM: Matrix<u32>>(conf: &MC) -> RM
13+
pub fn single_scan<MC: MatrixConfig, RM: Matrix<u32>>(conf: &MC) -> RM
1414
where MC::InputPin: InputPin,
1515
MC::OutputPin: OutputPin
1616
{

src/state.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ impl Default for KeyState {
1616
}
1717
}
1818

19-
fn process_key_state<RM, SM>(result: RM, previous_result: RM) -> SM
19+
pub fn process_key_state<RM, SM>(result: RM, previous_result: RM) -> SM
2020
where RM: Matrix<u32>,
2121
SM: Matrix<KeyState>
2222
{

0 commit comments

Comments
 (0)