- or download this
sub _device_read{
my $d = shift; # reduced line to relevant parts
...
# parse device config
$d->{regs}=from_json( $d->{regs} );
- or download this
sub _device_read{
...
...
return (...) if( $_[0] );
return( $c{_err_} );
};
- or download this
my %registers = %{$d->{regs}->{r}};
foreach my $reg (keys %registers){
...
$r->{$reg} = _prettify_byte($tmp);
};
- or download this
my %registers = %{$d->{regs}->{r}};
foreach my $reg (keys %registers){
...
$r->{$reg} = _prettify_byte($tmp);
};