import array


def square_wave(sample_length: int = 2):
    """Generate a single square wave of sample_length size"""
    square = array.array("H", [0] * sample_length)
    for i in range(sample_length // 2):
        square[i] = 0xFFFF
    return square