mirror of
https://github.com/google/pebble.git
synced 2025-04-30 15:21:41 -04:00
spelling: definition
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
This commit is contained in:
parent
2d7ac814c6
commit
a0b9ef4851
6 changed files with 15 additions and 15 deletions
|
@ -28,7 +28,7 @@ from ..util import stm32_crc
|
|||
|
||||
class PebbleFirmwareBinaryInfo(object):
|
||||
V1_STRUCT_VERSION = 1
|
||||
V1_STRUCT_DEFINTION = [
|
||||
V1_STRUCT_DEFINITION = [
|
||||
('20s', 'build_id'),
|
||||
('L', 'version_timestamp'),
|
||||
('32s', 'version_tag'),
|
||||
|
@ -72,7 +72,7 @@ class PebbleFirmwareBinaryInfo(object):
|
|||
|
||||
def _get_footer_struct(self):
|
||||
fmt = '<' + reduce(lambda s, t: s + t[0],
|
||||
PebbleFirmwareBinaryInfo.V1_STRUCT_DEFINTION, '')
|
||||
PebbleFirmwareBinaryInfo.V1_STRUCT_DEFINITION, '')
|
||||
return struct.Struct(fmt)
|
||||
|
||||
def _get_footer_data_from_bin(self, path):
|
||||
|
@ -83,7 +83,7 @@ class PebbleFirmwareBinaryInfo(object):
|
|||
return footer_data
|
||||
|
||||
def _parse_footer_data(self, footer_data):
|
||||
z = zip(PebbleFirmwareBinaryInfo.V1_STRUCT_DEFINTION,
|
||||
z = zip(PebbleFirmwareBinaryInfo.V1_STRUCT_DEFINITION,
|
||||
self.struct.unpack(footer_data))
|
||||
return {entry[1]: data for entry, data in z}
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ static const uint32_t FLASH_SPI_CLOCK = RCC_APB2Periph_SPI1;
|
|||
static const SpiPeriphClock FLASH_SPI_CLOCK_PERIPH = SpiPeriphClockAPB2;
|
||||
|
||||
|
||||
/* Pin Defintions */
|
||||
/* Pin Definitions */
|
||||
static const uint32_t FLASH_PIN_SCS = GPIO_Pin_4;
|
||||
static const uint32_t FLASH_PIN_SCLK = GPIO_Pin_5;
|
||||
static const uint32_t FLASH_PIN_MISO = GPIO_Pin_6;
|
||||
|
|
|
@ -50,7 +50,7 @@ typedef struct {
|
|||
//! The battery's percentage as a ratio32
|
||||
uint32_t charge_percent;
|
||||
//! WARNING: This maps to @see battery_charge_controller_thinks_we_are_charging as opposed to
|
||||
//! the user-facing defintion of whether we're charging (100% battery).
|
||||
//! the user-facing definition of whether we're charging (100% battery).
|
||||
bool is_charging;
|
||||
bool is_plugged;
|
||||
} PreciseBatteryChargeState;
|
||||
|
|
|
@ -28,7 +28,7 @@ class PebbleAppHeader(object):
|
|||
|
||||
# 116 bytes
|
||||
V1_STRUCT_VERSION = (0x08, 0x01)
|
||||
V1_STRUCT_DEFINTION = [
|
||||
V1_STRUCT_DEFINITION = [
|
||||
# format, name, deserialization transform, serialization transform
|
||||
('B', 'sdk_version_major', None, None),
|
||||
('B', 'sdk_version_minor', None, None),
|
||||
|
@ -49,9 +49,9 @@ class PebbleAppHeader(object):
|
|||
|
||||
# 120 bytes
|
||||
V2_STRUCT_VERSION = (0x10, 0x00)
|
||||
V2_STRUCT_DEFINTION = list(V1_STRUCT_DEFINTION)
|
||||
del V2_STRUCT_DEFINTION[12] # relocation list was dropped in v2.x
|
||||
V2_STRUCT_DEFINTION += [
|
||||
V2_STRUCT_DEFINITION = list(V1_STRUCT_DEFINITION)
|
||||
del V2_STRUCT_DEFINITION[12] # relocation list was dropped in v2.x
|
||||
V2_STRUCT_DEFINITION += [
|
||||
('I', 'resource_crc', None, None),
|
||||
('I', 'resource_timestamp', None, None),
|
||||
('H', 'virtual_size', None, None),
|
||||
|
@ -59,8 +59,8 @@ class PebbleAppHeader(object):
|
|||
V2_HEADER_LENGTH = 10 + 120
|
||||
|
||||
DEFINITION_MAP = {
|
||||
V1_STRUCT_VERSION: V1_STRUCT_DEFINTION,
|
||||
V2_STRUCT_VERSION: V2_STRUCT_DEFINTION,
|
||||
V1_STRUCT_VERSION: V1_STRUCT_DEFINITION,
|
||||
V2_STRUCT_VERSION: V2_STRUCT_DEFINITION,
|
||||
}
|
||||
|
||||
@classmethod
|
||||
|
|
|
@ -23,7 +23,7 @@ import stm32_crc
|
|||
|
||||
class PebbleFirmwareBinaryInfo(object):
|
||||
V1_STRUCT_VERSION = 1
|
||||
V1_STRUCT_DEFINTION = [
|
||||
V1_STRUCT_DEFINITION = [
|
||||
('20s', 'build_id'),
|
||||
('L', 'version_timestamp'),
|
||||
('32s', 'version_tag'),
|
||||
|
@ -67,7 +67,7 @@ class PebbleFirmwareBinaryInfo(object):
|
|||
|
||||
def _get_footer_struct(self):
|
||||
fmt = '<' + reduce(lambda s, t: s + t[0],
|
||||
PebbleFirmwareBinaryInfo.V1_STRUCT_DEFINTION, '')
|
||||
PebbleFirmwareBinaryInfo.V1_STRUCT_DEFINITION, '')
|
||||
return struct.Struct(fmt)
|
||||
|
||||
def _get_footer_data_from_elf(self, path):
|
||||
|
@ -85,7 +85,7 @@ class PebbleFirmwareBinaryInfo(object):
|
|||
return footer_data
|
||||
|
||||
def _parse_footer_data(self, footer_data):
|
||||
z = zip(PebbleFirmwareBinaryInfo.V1_STRUCT_DEFINTION,
|
||||
z = zip(PebbleFirmwareBinaryInfo.V1_STRUCT_DEFINITION,
|
||||
self.struct.unpack(footer_data))
|
||||
return {entry[1]: data for entry, data in z}
|
||||
|
||||
|
|
|
@ -46,7 +46,7 @@ class ResourceGenerator(ResourceGeneratorBase):
|
|||
'filename': str(definition_dict['file'] if 'file' in definition_dict else None)}
|
||||
resources = [resource]
|
||||
|
||||
# Now generate ResourceDefintion objects for each resource
|
||||
# Now generate ResourceDefinition objects for each resource
|
||||
target_platforms = definition_dict.get('targetPlatforms', None)
|
||||
aliases = definition_dict.get('aliases', [])
|
||||
builtin = False if bld.variant == 'applib' else definition_dict.get('builtin', False)
|
||||
|
|
Loading…
Add table
Reference in a new issue