---
title: "Disk"
canonical_url: https://developer.repebble.com/pebbleos/docs/drivers/disk/
last_updated: 2026-12-03
sdk_version: 4.44
---
# Disk

Source: https://developer.repebble.com/pebbleos/docs/drivers/disk/

A disk is block storage read and written by whole sectors of one size, numbered from 0: what a file system or the USB mass storage function (see [USB](https://developer.repebble.com/pebbleos/docs/subsystems/usb.md)) sits on. The class only checks that the sectors are on the disk, that it is ready and that it takes writes; how a driver stores them, erase blocks and caching included, is its own. A write may stay in the driver until `pbl_disk_sync()`. The class does not serialize calls: a driver that cannot take them from several threads at once serializes them itself.

| 

 | 

 |
| --- | --- |
| 

Directory

 | 

`drivers/disk`

 |
| 

Header

 | 

`pbl/drivers/disk.h`

 |
| 

Kconfig

 | 

`CONFIG_DISK`, enabled by the application

 |
| 

Sample

 | 

[USB: Mass storage](https://developer.repebble.com/pebbleos/docs/samples/subsys/usb/msc.md)

 |
| 

API

 | 

[API reference](https://developer.repebble.com/pebbleos/apidoc/d6/d79/group __drivers__ disk.html)

 |

## Drivers

| 

Driver

 | 

Device

 | 

Kconfig

 |
| --- | --- | --- |
| 

RAM disk

 | 

`pbl_disk_ram` (`pbl/drivers/disk/ram.h`)

 | 

`CONFIG_DISK_RAM`

 |

The RAM disk has no hardware to describe, so it is not a devicetree node: the driver defines its one device, `CONFIG_DISK_RAM_SIZE` KiB of the application’s RAM in 512-byte sectors, zeroed at boot.

Generated from PebbleOS [d278268fe](https://github.com/coredevices/pebbleos/commit/d278268fec28d152cdda8d97da06154ada5fbe3a). This page is maintained in the pebbleos repository: [docs/drivers/disk.md](https://github.com/coredevices/pebbleos/blob/d278268fec28d152cdda8d97da06154ada5fbe3a/docs/drivers/disk.md).
